/* O助手 v2.6.55 / UI-18: narrow-screen accessibility and optional custom attachment controls.
   UI-17 shared VIP + two record entries and all data flows remain unchanged. */

/* F01: file selection, replace and cancel. Keep the real input and name so
   FormData, mandatory-file validation and private upload rules are unchanged. */
#page .ozs-custom-page .ozs26473-file-field{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  gap:8px!important;min-width:0;max-width:100%;margin:0!important
}
#page .ozs-custom-page .ozs26473-file-button{
  display:inline-flex!important;flex-direction:row!important;align-items:center!important;
  justify-content:center!important;gap:8px!important;flex:0 0 auto;
  min-height:44px!important;width:auto!important;padding:0 13px!important;
  cursor:pointer!important;pointer-events:auto!important;text-align:center!important
}
#page .ozs-custom-page .ozs26473-file-button .icon{width:18px;height:18px;flex:none}
#page .ozs-custom-page .ozs26473-file-name{flex:1 1 120px;min-width:0;overflow-wrap:anywhere}
#page .ozs-custom-page .ozs26473-file-remove{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:44px;min-width:76px;padding:0 12px;
  border:1px solid #e7c9c3;border-radius:10px;background:#fff8f6;
  color:#a95449;font-size:13px;font-weight:650;cursor:pointer;
  flex:0 0 auto;transition:background .18s ease,border-color .18s ease
}
#page .ozs-custom-page .ozs26473-file-remove .icon{width:20px;height:20px;flex:none}
#page .ozs-custom-page .ozs26473-file-remove[hidden]{display:none!important}
#page .ozs-custom-page .ozs26473-file-remove:hover{background:#fcebe7;border-color:#d9a39a}
#page .ozs-custom-page .ozs26473-file-remove:focus-visible,
#page .ozs-custom-page .ozs26473-file-button:focus-within{outline:2px solid #347958;outline-offset:2px}
html[data-ozs-theme="dark"] #page .ozs-custom-page .ozs26473-file-remove{
  background:#3a2b2c;border-color:#76504e;color:#f3c9c2
}
html[data-ozs-theme="dark"] #page .ozs-custom-page .ozs26473-file-remove:hover{
  background:#523537;border-color:#b87971
}
@media(max-width:560px){
  #page .ozs-custom-page .ozs26473-file-select{flex-wrap:wrap;gap:9px}
  #page .ozs-custom-page .ozs26473-file-button{max-width:100%}
  #page .ozs-custom-page .ozs26473-file-name{flex:1 1 110px}
}
@media(max-width:360px){
  #page .ozs-custom-page .ozs26473-file-remove{margin-left:auto}
}

/* C01: keep genuinely usable mobile touch areas without altering PC layouts.
   The tiny 38px assets stay 20px inside a 44px control. */
@media(max-width:360px){
  .site-header .header-inner{padding-inline:7px!important;gap:3px!important}
  .site-header .site-brand{gap:3px!important;min-width:0}
  .site-header .site-brand-word{font-size:22px!important}
  .site-header .site-brand-mark,.site-header .site-brand-mark svg{
    width:29px!important;height:29px!important;flex-basis:29px!important
  }
  .site-header .site-header-actions{gap:3px!important}
  .site-header .site-header-actions>:is(.notice-trigger,.ozs-theme-trigger,.site-account,.ozs2625-mobile-search-trigger,.mobile-menu-trigger),
  .site-header .mobile-menu-trigger{
    width:44px!important;height:44px!important;
    min-width:44px!important;min-height:44px!important;flex:0 0 44px!important
  }
}

/* C03: only the very narrow messages viewport may break the intentionally
   single-row toolbar. Tabs remain one row and 'read all' gets a full tap area. */
@media(max-width:365px){
  .ozs2626-messages-page .ozs2628-message-toolbar{flex-wrap:wrap!important;gap:8px!important}
  .ozs2628-message-toolbar .ozs2626-message-tabs{
    flex:1 1 100%;width:100%;max-width:100%;justify-content:space-between
  }
  .ozs2628-message-toolbar .ozs2626-message-tabs button{
    flex:1 1 0;min-width:0;white-space:normal;min-height:44px!important
  }
  .ozs2628-message-toolbar .ozs2627-message-actions{
    flex:1 1 100%;display:flex;justify-content:flex-end;min-width:0
  }
  .ozs2628-message-toolbar .ozs2626-read-all{min-height:44px!important}
}
@media(prefers-reduced-motion:reduce){
  #page .ozs-custom-page .ozs26473-file-remove{transition:none}
}
