/* Layout fallbacks shared by IE9-11, older Safari and current browsers. */
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-admin-area {gap:0;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-admin-area a + a {margin-left:8px;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area {display:block;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area:after {content:"";display:block;clear:both;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a {float:left;display:block;width:47%;width:calc(50% - 6px);margin:0 0 10px;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a:nth-child(even) {margin-left:12px;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a:nth-last-child(-n+2) {margin-bottom:0;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a:nth-child(odd) {clear:left;}
@supports (display:grid) {
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area:after {display:none;content:none;}
body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a,body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a:nth-child(even),body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card .user-card-main-area a:nth-last-child(-n+2) {display:flex;float:none;clear:none;width:auto;margin:0;}
}
body.discuzx5 .topics .topic .iscwo-x5-topic-title,
body.discuzx5 .topics .topic .iscwo-x5-topic-stats {gap:0;}
body.discuzx5 .topics .topic .iscwo-x5-topic-stats > * + * {margin-left:15px;}
html body.discuzx5 #postform .pbt > .z {gap:0!important;}
html body.discuzx5 #postform .pbt > .z > * + * {margin-left:10px!important;}

/* IE9/10: retain usable header, topic rows and post form without Flexbox. */
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .dz_nav_logo {display:block;height:73px;line-height:73px;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .dz_nav_logo img {float:none;vertical-align:middle;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .header-right {display:block;line-height:70px;white-space:nowrap;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .header-right > * {display:inline-block;vertical-align:middle;line-height:normal;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .header-user-avatar {line-height:70px;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .header-user-avatar img {vertical-align:middle;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-top {display:block!important;height:auto!important;min-height:94px;box-sizing:border-box;padding-top:15px!important;padding-bottom:15px!important;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-top .block_avatar {float:left;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-top .block_name {padding-top:8px;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-admin-area,
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-admin-area a,
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-bottom,
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-bottom a {display:block!important;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-admin-area a {display:inline-block!important;}
html.iscwo-no-flex body.discuzx5 #dz_btm_layer .user-card-bottom {text-align:right;}
html.iscwo-no-flex body.discuzx5 .topics .topic.media {display:block!important;}
html.iscwo-no-flex body.discuzx5 .topics .topic.media:after {content:"";display:block;clear:both;}
html.iscwo-no-flex body.discuzx5 .topics .topic .media-left {float:left;margin-right:14px;}
html.iscwo-no-flex body.discuzx5 .topics .topic .infos.media-body {overflow:hidden;}
html.iscwo-no-flex body.discuzx5 .topics .topic .iscwo-x5-topic-title,
html.iscwo-no-flex body.discuzx5 .topics .topic .iscwo-x5-topic-stats {display:block;}
html.iscwo-no-flex body.discuzx5 .topics .topic .iscwo-x5-topic-stats > * {display:inline-block;}
html.iscwo-no-flex body.discuzx5 #postform .pbt > .z {display:block!important;}
html.iscwo-no-flex body.discuzx5 #postform .pbt > .z > * + * {margin-left:0!important;}
html.iscwo-no-grid body.pg_spacecp .tdats {display:block;white-space:normal;font-size:12px;}
html.iscwo-no-grid body.pg_spacecp .tdats > .tdat {display:inline-table!important;width:32%!important;margin-right:1%!important;vertical-align:top;}

/* Avoid a fixed 1280px content canvas on smaller desktop windows and phones. */
html body.discuzx5 .wp, html body.discuzx5 .container {box-sizing:border-box;max-width:100%;}
@media screen and (max-width:1279px) {
    html body.discuzx5 {min-width:0;}
    html body.discuzx5 #wp, html body.discuzx5 #ct.wp,
    html body.discuzx5 .main-container, html body.discuzx5 .wp {width:100%!important;max-width:100%!important;min-width:0;box-sizing:border-box;}
    body.discuzx5 .wp > .row {margin-left:0;margin-right:0;}
    body.discuzx5 #dz_btm_layer {position:relative;}
    body.discuzx5 #dz_btm_layer .dz_btm_layer {width:100%;min-width:0;height:auto;padding:0 12px;box-sizing:border-box;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav {width:auto;max-width:100%;height:auto;overflow:visible;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav ul {margin:0;}
    body.discuzx5 #dz_btm_layer .dz_layer_dl {float:none;clear:both;}
    body.discuzx5 #dz_btm_layer .header-right {height:50px;}
    html.iscwo-no-flex body.discuzx5 #dz_btm_layer .header-right,
    html.iscwo-no-flex body.discuzx5 #dz_btm_layer .header-user-avatar {line-height:50px;}
    body.discuzx5 #dz_btm_layer .header-user-dropdown {top:40px;right:0;}
    body.discuzx5 #dz_btm_layer .header-user .iscwo-dismall-user-card {max-width:calc(100vw - 24px);}
}
/* Keep desktop-window navigation and account controls on the same row. */
@media screen and (min-width:768px) and (max-width:1279px) {
    body.discuzx5 #dz_btm_layer .dz_btm_layer {display:flex;align-items:center;height:73px;}
    body.discuzx5 #dz_btm_layer .dz_nav .dz_nav_logo {float:none;flex:0 0 auto;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav {float:none;flex:1 1 auto;min-width:0;max-width:none;height:73px;overflow-x:auto;overflow-y:hidden;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav ul {display:flex;flex-wrap:nowrap;width:max-content;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav ul li {float:none;flex:0 0 auto;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav ul li a {margin-right:18px;letter-spacing:0;white-space:nowrap;}
    body.discuzx5 #dz_btm_layer .dz_layer_dl {float:none;clear:none;flex:0 0 auto;margin-left:12px;}
    body.discuzx5 #dz_btm_layer .header-right {height:70px;}
    body.discuzx5 #dz_btm_layer .header-searcher .search-input {width:160px;box-sizing:border-box;padding-right:38px;}
    body.discuzx5 #dz_btm_layer .header-user-dropdown {top:60px;}
}
@media screen and (max-width:767px) {
    body.discuzx5 #dz_btm_layer .dz_nav .dz_nav_logo {float:none;height:54px;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav {float:none;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav ul:after {content:"";display:block;clear:both;}
    body.discuzx5 #dz_btm_layer .dz_layer_nav ul li a {height:44px;line-height:44px;margin-right:18px;font-size:14px;letter-spacing:0;}
    body.discuzx5 #dz_btm_layer .header-searcher {flex:1;min-width:0;margin-right:8px;}
    body.discuzx5 #dz_btm_layer .header-searcher .search-input {width:100%;box-sizing:border-box;padding-right:38px;}
    body.discuzx5 .topics .topic .infos.media-body {padding-right:0;}
    body.discuzx5 .topics .topic .iscwo-x5-topic-title {padding-right:22px;}
    body.discuzx5 .topics .topic .iscwo-x5-topic-stats {position:static;margin-top:8px;justify-content:flex-start;}
    html body.discuzx5 #postform .pbt > .z {display:block!important;}
    html body.discuzx5 #postform .pbt > .z > * + * {margin-left:0!important;}
}

/* The portal already has a primary search form: keep its narrow header compact. */
@media screen and (max-width:767px) {
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_btm_layer {
        display:grid;grid-template-columns:140px minmax(0,1fr);grid-template-rows:56px 44px;align-items:center;
    }
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_nav_logo {grid-column:1;grid-row:1;margin-right:0;height:56px;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_layer_dl {grid-column:2;grid-row:1;float:none;clear:none;min-width:0;justify-self:end;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .header-right {height:56px;justify-content:flex-end;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .header-searcher {display:none;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .header-user-dropdown {top:50px;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_layer_nav {grid-column:1 / -1;grid-row:2;width:100%;min-width:0;height:44px;overflow-x:auto;overflow-y:hidden;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_layer_nav ul {display:flex;flex-wrap:nowrap;width:max-content;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_layer_nav ul li {float:none;flex:0 0 auto;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_layer_nav ul li a {white-space:nowrap;}
    body.discuzx5 #dz_btm_layer.iscwo-portal-header .dz_btm_layer > .clear {display:none;}
}

/* Constrain the configured 1600px header at intermediate desktop widths. */
body.discuzx5 #dz_btm_layer .dz_btm_layer {box-sizing:border-box;max-width:100%;}
@media screen and (min-width:1280px) and (max-width:1639px) {
 body.discuzx5 #dz_btm_layer .dz_layer_nav {width:auto;max-width:calc(100% - 540px);}
}
@media screen and (max-width:1279px) {
 body.discuzx5 #dz_rnav {position:fixed;left:auto !important;right:10px !important;margin-left:0 !important;}
}
@media screen and (max-width:767px) {
 body.discuzx5.pg_viewthread .topic-detail > .panel-heading {display:block;}
 body.discuzx5.pg_viewthread .topic-detail > .panel-heading .media-body {display:block;width:auto;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word;}
 body.discuzx5.pg_viewthread .topic-detail > .panel-heading .media-right {display:none;}
 body.discuzx5.pg_viewthread .t_f {overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word;}
 body.discuzx5.pg_viewthread .t_f img {max-width:100% !important;height:auto !important;}
 body.discuzx5.pg_viewthread .t_f [id^="attach_"] {white-space:normal !important;}
}

/* Native showPrompt text notifications: replace mixed legacy sprite skins. */
#ntcwin.popuptext > .pc_inner {
    box-sizing: border-box;
    min-width: 200px;
    max-width: calc(100vw - 32px);
    width: auto;
    height: auto;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid #d2e8e4;
    border-radius: 10px;
    background: #f4fbf9;
    box-shadow: 0 8px 28px rgba(20, 45, 40, .16);
    color: #24665b;
    line-height: 24px;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
}
#ntcwin.popuptext > .pc_inner > i,
#ntcwin.popuptext > .pc_inner > span {
    margin: 0;
    color: inherit;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: inherit;
}
body.iscwo-dark #ntcwin.popuptext > .pc_inner {
    background: #253530;
    border-color: #3d5b50;
    color: #d8eee5;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
}
