#PoPy{position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;width:auto!important;background:rgba(0,0,0,.5)!important;z-index:9999!important;}
#PoPy ._citys{position:absolute;left:0;right:0;bottom:0;width:100%!important;border:0;padding:12px 12px calc(16px + env(safe-area-inset-bottom));max-width:none!important;margin-left:auto;margin-right:auto;-webkit-overflow-scrolling:touch;background:#ffffff;border-top-left-radius:16px;border-top-right-radius:16px;box-shadow:0 -8px 24px rgba(0,0,0,.18);z-index:10000!important;}
#PoPy ._citys span{font-family:'宋体';height:32px;width:32px;line-height:32px;font-size:22px;color:#64748b!important;border:1px solid #e5e7eb;position:absolute;right:12px;top:12px;z-index:10001;border-radius:8px;background:#fff;cursor:pointer;}
#PoPy #cColse {
    position: absolute!important;
    right: 10px!important;
    top: 8px!important;
    width: 30px!important;
    height: 30px!important;
    line-height: 30px!important;
    text-align: center!important;
    font-size: 22px!important;
    color: #334155!important;
    background: #ffffff!important;
    border: 1px solid #e5e7eb!important;
    border-radius: 10px!important;
    z-index: 10002!important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08)!important;
}

#PoPy ._citys ._citys1 a{height:40px!important;line-height:40px!important;}
@media screen and (max-width: 780px){
  #PoPy ._citys ._citys1 a{flex:0 0 calc((100% - 16px)/3)!important;width:calc((100% - 16px)/3)!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
}
@media screen and (min-width: 781px){
  #PoPy ._citys ._citys1 a{flex:0 0 calc((100% - 50px)/6)!important;width:calc((100% - 50px)/6)!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
}
#PoPy ._citys1{padding:0;min-height:240px;height:auto;padding-bottom:12px;padding-top:12px;overflow-y:auto;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;-moz-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-content:flex-start;-moz-align-content:flex-start;align-content:flex-start;gap:8px;overscroll-behavior:contain;}
#PoPy ._citys1 a{border:1px solid #d1d5db;border-radius:12px;background:#f7f8fa;color:#1f2d3d;font-size:14px;text-align:center;box-sizing:border-box;transition:all .2s ease;position:relative;z-index:1;height:40px!important;line-height:40px!important;margin:0!important;padding:0 8px!important;flex:0 0 calc((100% - 16px)/3)!important;width:calc((100% - 16px)/3)!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#PoPy #_citys0 a,#PoPy #_citys1 a,#PoPy #_citys2 a{flex:0 0 calc((100% - 16px)/3)!important;width:calc((100% - 16px)/3)!important;min-width:0!important;}
#PoPy ._citys1 a:active{background:#17925c;color:#fff;border-color:#17925c;}
#PoPy ._citys0{border-bottom:0!important;vertical-align:top;height:auto;display:flex;text-align:center;position:relative;top:auto;background:#fff;z-index:auto;box-shadow:none;}
#PoPy ._citys0::after{content:'';position:absolute;top:14px;left:0;right:0;line-height:32px;text-align:center;font-size:16px;color:#334155;}
#PoPy ._citys0 li{width:33.333333%;border-bottom:1px solid #e5e7eb;padding:1px 0;color:#374151;font-size:16px;line-height:44px;font-weight:600;}
#PoPy ._citys0 .citySel{border-bottom:2px solid #17925c!important;color:#17925c!important;background:none!important;padding-bottom:0!important;}
@media screen and (min-width: 781px) {
    #PoPy #cColse {
        position:absolute!important;
        left: 6px!important;
        top: 5px!important;
        width: 36px!important;
        height: 36px!important;
        line-height: 36px!important;
        text-align: center!important;
        font-size: 22px!important;
        color: #334155!important;
        background: #ffffff!important;
        border: 1px solid #e5e7eb!important;
        border-radius: 10px!important;
        z-index: 10002!important;
        box-shadow: 0 2px 8px rgba(0,0,0,.08)!important;
        text-indent: 0!important;
        overflow: visible!important;
        cursor: pointer!important;
    }
#PoPy ._citys0 li{font-size:.9rem;}
#PoPy ._citys1 a{font-size:.9rem!important;cursor:pointer!important;flex:0 0 calc((100% - 50px)/6)!important;width:calc((100% - 50px)/6)!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;height:40px!important;line-height:40px!important;margin:0!important;padding:0 8px!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;}
#PoPy #_citys0 a,#PoPy #_citys1 a,#PoPy #_citys2 a{flex:0 0 calc((100% - 50px)/6)!important;width:calc((100% - 50px)/6)!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#PoPy ._citys1{height:auto;gap:10px;padding-bottom:8px!important;}
#PoPy ._citys0{padding-top:0;}
#PoPy ._citys1 a{border:1px solid #e5e7eb;}
#PoPy ._citys0 .citySel{border-bottom:2px solid #17925c!important;color:#17925c!important;}
#PoPy ._citys0::after{content:'';}
#PoPy ._citys{width:640px!important;max-height:72vh!important;top:50%;transform:translateY(-50%);bottom:auto!important;overflow:auto;}
#PoPy{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:0!important;margin:auto;}
._citys{width:auto!important;border:0!important;padding:16px!important;background:#ffffff!important;border-radius:12px!important;display:block!important;box-shadow:0 12px 30px rgba(0,0,0,.18)!important;}
._citys span{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:0!important;text-indent:-300px!important;border:0!important;width:auto!important;height:auto!important;cursor:auto!important;text-align:left!important;overflow:hidden!important;}
.citySel{background-color:#17925c!important;color:#fff!important;}
._citys0,._citys1{position:relative!important;z-index:1!important;}
._citys0{border-bottom-color:#17925c!important;border-top-left-radius:3px!important;overflow:hidden!important;height:auto!important;}
._citys0 li{height:38px!important;line-height:38px!important;}
._citys1{padding-top:5px!important;min-height:80px!important;}
._citys1 a{width:auto!important;min-width:96px!important;max-width:100%!important;font-size:14px!important;background:#f7f8fa!important;color:#374151!important;border:1px solid #e5e7eb!important;border-radius:8px!important;margin:6px 0 0 10px!important;padding:8px 12px!important;transition:all .2s ease!important;flex:0 0 auto!important;height:auto!important;line-height:1.6!important;overflow:visible!important;white-space:normal!important;}
._citys1 a:hover{color:#fff!important;background-color:#17925c!important;border-color:#17925c!important;}
._citys1 a:focus{outline:none!important;box-shadow:0 0 0 2px rgba(23,146,92,.2)!important;}
}

#PoPy #_citys0,#PoPy #_citys1,#PoPy #_citys2{min-height:240px!important;height:auto!important;}
#PoPy ._citys ._citys1 a{height:40px!important;line-height:40px!important;}
@media screen and (max-width: 780px){
  #PoPy ._citys ._citys1 a{flex:0 0 calc((100% - 16px)/3)!important;width:calc((100% - 16px)/3)!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
}
@media screen and (min-width: 781px){
  #PoPy ._citys ._citys1 a{flex:0 0 calc((100% - 50px)/6)!important;width:calc((100% - 50px)/6)!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
}

@media screen and (max-width: 780px){
  main{padding-left:6px!important;padding-right:6px!important;}
  #namingCard{padding-left:6px!important;padding-right:6px!important;}
  #results .bg-white{padding:8px!important;}
  #results .flex .px-3{padding-left:6px!important;padding-right:6px!important;}
}
/* 结果卡片间距（所有端） */
#results > .bg-white{margin-bottom:12px;}
@media screen and (min-width: 781px){
  #results > .bg-white{margin-bottom:16px;}
}

.up_names{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;}
.left_names{display:flex;gap:16px;}
.left_names .flex h3{font-size:36px;font-weight:600;color:#334155;line-height:1;margin-right:8px;}
.left_names .flex span{display:flex;flex-direction:column;gap:2px;}
.left_names .flex span p{font-size:12px;color:#6b7280;line-height:1.4;}
.left_names .flex span em{color:#374151;font-style:normal;}
.r_grade{font-size:36px;font-weight:700;color:#E29A13;display:flex;align-items:flex-end;}
.r_grade em{font-size:.6em;margin-left:2px;}
@media screen and (max-width: 780px){
  .left_names{gap:12px;}
  .left_names .flex h3{font-size:30px;}
  .left_names .flex span p{font-size:0;line-height:1.2;}
  .left_names .flex span p em{font-size:12px;}
  .r_grade{font-size:28px;}
}

.yongzi-wrap{display:flex;flex-direction:column;gap:6px;}
.yongzi-item{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.wx-chip{display:inline-flex;align-items:center;padding:0 6px;border-radius:10px;font-size:12px;line-height:20px;color:#fff;white-space:nowrap;}
.wx-icon{width:16px;height:16px;display:inline-block;vertical-align:middle;}
.yongzi-desc{flex:1 1 100%;font-size:13px;line-height:1.6;color:#374151;}
.wx-jin{background:#d4af37;}
.wx-mu{background:#22c55e;}
.wx-shui{background:#0ea5e9;}
.wx-huo{background:#ef4444;}
.wx-tu{background:#a16207;}
.wx-none{background:#9ca3af;}
@media screen and (max-width: 780px){
  .yongzi-item{gap:4px;}
  .wx-chip{font-size:11px;line-height:18px;padding:0 6px;}
  .wx-icon{width:14px;height:14px;}
  .yongzi-desc{font-size:12px;}
}
.poem-hl{background:#FEF08A;border-radius:2px;padding:0 2px;color:#111827;}
/* 五行统计进度条 */
.analysis-bars{margin-top:6px;display:flex;flex-direction:column;gap:6px;}
.wx-bar-row{display:flex;align-items:center;gap:8px;}
.wx-bar-label{display:inline-flex;align-items:center;gap:6px;min-width:64px;font-size:14px;color:#374151;}
.wx-bar{flex:1;height:10px;background:#e5e7eb;border-radius:9999px;overflow:hidden;}
.wx-bar-fill{height:100%;border-radius:9999px;}
.wx-bar-percent{min-width:40px;text-align:right;font-size:12px;color:#6b7280;}
.bar-jin{background:#d4af37;}
.bar-mu{background:#22c55e;}
.bar-shui{background:#0ea5e9;}
.bar-huo{background:#ef4444;}
.bar-tu{background:#a16207;}
 .analysis-card{background:#fff;border:1px solid #DCE6F4;border-radius:18px;box-shadow:0 6px 20px rgba(199,210,232,.35);padding:16px;margin-bottom:16px;}
 .analysis-title{position:relative;text-align:center;font-weight:700;color:#2F4D78;font-size:20px;margin-bottom:10px;}
 .analysis-title::before,.analysis-title::after{content:'';display:inline-block;width:8px;height:8px;border-radius:9999px;background:#A7F3D0;margin:0 8px;vertical-align:middle;}
 .analysis-badge{display:inline-block;background:#2E6B56;color:#fff;border-radius:8px;padding:6px 10px;font-size:12px;margin:8px 0;}
 .analysis-table{width:100%;border-collapse:collapse;margin-top:8px;margin-bottom:4px;}
 .analysis-table th{white-space:nowrap;text-align:left;background:#F0FDF4;color:#1f2d3d;border:1px solid #D1D5DB;padding:8px;font-weight:600;width:120px;}
 .analysis-table td{border:1px solid #D1D5DB;padding:8px;text-align:center;background:#fff;color:#374151;}
 .analysis-counts{display:flex;align-items:center;gap:8px;font-size:14px;margin:6px 0 10px;color:#374151;}
 @media screen and (max-width: 780px){
   .analysis-card{padding:12px;border-radius:14px;}
   .analysis-title{font-size:18px;}
   .analysis-table th,.analysis-table td{padding:6px;font-size:12px;}
   .analysis-badge{padding:5px 8px;font-size:11px;}
 }
