@charset "utf-8";

/*
作者:D.Young
主页：https://yyv.me/
github：https://github.com/5iux/sou
日期：2019-07-11
版权所有，请勿删除
*/


/*@import url(//fonts.loli.net/earlyaccess/notosansscsliced.css);*/

* {
    padding: 0;
    margin: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background:url("https://bing.xmix.one?random") no-repeat center/cover;
}

html {
    font-family: 'Noto Sans SC Sliced', PingFangSC-Light, Microsoft YaHei UI, Microsoft YaHei, helvetica, sans-serif;
    font-weight: 500;
    color: #000;
}

form,
input,
button {
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: none;
}

input::-webkit-input-placeholder {
    color: #ccc;
    letter-spacing: 2px;
    font-size: 16px;
}

ul,
li {
    display: block;
    list-style: none;
}

a {
    text-decoration: none;
    color: #000;
}

#content {
    width: 100%;
    height: 100%;
}

.con {
    width: 100%;
    transition: 1s all;
    margin: auto;
    min-width: 320px;
    height: 380px;
    position: absolute;
    left: 0;
    top: -100px;
    right: 0;
    bottom: 0;
}

.con .shlogo {
    position: relative;
    width: 480px;
    height: 120px;
    margin: 20px auto;
    background: url(icon/logo.svg) no-repeat center/cover;
}

.con .shlogo a {
    width: 100%;
    display: block;
    width: 100%;
    height: 100%;
}

.con .sou {
    --color-search-bg: transparent;
    --color-search-text: #333;
    --color-search-placeholder: #999;
    --color-accent: #4a7cff;
    --search-bar-height: 52px;
    --search-bar-font-size: 15px;
    --search-engine-icon-size: 22px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-pill: 999px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 680px;
    position: relative;
    width: calc(100% - 60px);
    min-width: 320px;
    margin: 0 auto;
}

.search-section {
    position: relative;
    width: 100%;
    margin: 10px auto 30px;
}

.search-bar {
    display: flex;
    align-items: center;
    height: var(--search-bar-height);
    background: var(--color-search-bg);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(74, 124, 255, 0.35);
    transform: translateY(-1px);
}

.search-engine-trigger {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 14px 0 18px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    color: #666;
    cursor: pointer;
}

.search-engine-icon {
    width: var(--search-engine-icon-size);
    height: var(--search-engine-icon-size);
    border-radius: 50%;
    object-fit: contain;
}

.search-chevron {
    opacity: 0.5;
}

.search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px 0 14px;
    border: none;
    background: transparent;
    color: var(--color-search-text);
    font-size: var(--search-bar-font-size);
    outline: none;
}

.search-input::placeholder {
    color: var(--color-search-placeholder);
}

.search-submit {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    margin-right: 4px;
    border-radius: 50%;
    color: #777;
    cursor: pointer;
    font-size: 22px;
    line-height: 46px;
}

.search-submit:hover {
    color: #fff;
    background: linear-gradient(135deg, #4a7cff, #8b5cf6);
}

.search-engines-panel {
    --engine-cols: 1;
    --engine-cell: 48px;
    --engine-gap: 10px;
    --engine-pad-x: 28px;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 800;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(var(--engine-cols), var(--engine-cell));
    justify-content: center;
    gap: 8px var(--engine-gap);
    padding: 10px 14px;
    width: max-content;
    max-width: min(calc(100vw - 24px), calc(var(--engine-cols) * var(--engine-cell) + (var(--engine-cols) - 1) * var(--engine-gap) + var(--engine-pad-x)));
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    animation: panelIn 0.2s ease;
}

.search-engines-panel.hidden {
    display: none;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.search-engine-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: var(--engine-cell, 48px);
    padding: 2px 0;
    border-radius: var(--radius-sm);
    transition: transform var(--transition), background var(--transition);
    color: #444;
    font-size: 0.65rem;
    line-height: 1.2;
    cursor: pointer;
}

.search-engine-chip span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.search-engine-chip:hover {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.04);
}

.search-engine-chip.active {
    color: var(--color-accent);
    font-weight: 600;
}

.search-engine-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.con .sou #word{
    width: calc(100% - 70px);
    border: 15px solid #f1f1f1;
    border-radius: 10px;
    left:20px;
    position: absolute;z-index: 500; top:65px;
    background: #f1f1f1;
    line-height: 30px; font-style: 16px;overflow: hidden;
    display: none; 
}
.con .sou #word li{
    cursor: pointer;
    color: #555;
    font-size: 14px;
    border-radius: 8px;
    padding: 0 8px;
}
.con .sou #word li:hover{
    color: #29f;
    background: rgba(34, 153, 255, 0.08);
}

.foot {
    position: absolute;
    bottom: 10px;
    text-align: center;
    width: 100%;
    color: #999;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
}

.weather-card {
    position: absolute;
    left: 18px;
    top: 16px;
    z-index: 300;
    min-width: 188px;
    max-width: 300px;
    color: rgba(25, 30, 38, 0.88);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(20, 28, 45, 0.16);
    overflow: hidden;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.weather-card:hover,
.weather-card.weather-expanded {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 20px 44px rgba(20, 28, 45, 0.22);
}

.weather-main {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px 8px 12px;
    box-sizing: border-box;
    color: inherit;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: default;
}

button.weather-main {
    cursor: pointer;
}

.weather-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    font-size: 18px;
    flex-shrink: 0;
}

.weather-temp {
    font-size: 25px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -1px;
    flex-shrink: 0;
}

.weather-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.weather-meta b {
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weather-meta small {
    color: rgba(35, 42, 55, 0.58);
    font-size: 11px;
    white-space: nowrap;
}

.weather-btn {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    color: rgba(35, 42, 55, 0.6);
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.weather-meta + .weather-btn {
    margin-left: auto;
}

.weather-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, #29f, #8b5cf6);
}

.weather-locate:hover {
    transform: rotate(16deg);
}

.weather-detail {
    max-height: 0;
    opacity: 0;
    padding: 0 12px;
    overflow: hidden;
    transition: max-height 0.24s ease, opacity 0.2s ease, padding 0.2s ease;
}

.weather-card.weather-expanded .weather-detail {
    max-height: 260px;
    opacity: 1;
    padding: 0 12px 12px;
}

.weather-detail p {
    margin: 0 0 8px;
    color: rgba(35, 42, 55, 0.62);
    font-size: 11px;
}

.weather-detail ul {
    display: grid;
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 6px;
}

.weather-detail li {
    padding: 7px 5px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.46);
    text-align: center;
}

.weather-detail li span,
.weather-detail li em {
    display: block;
    color: rgba(35, 42, 55, 0.62);
    font-size: 10px;
    font-style: normal;
}

.weather-detail li b {
    display: block;
    margin: 2px 0;
    font-size: 15px;
}

.weather-loading .weather-icon {
    animation: weatherPulse 1.4s ease-in-out infinite;
}

.weather-error {
    color: rgba(120, 35, 45, 0.88);
}

@keyframes weatherPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.72;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

.calendar-card {
    position: absolute;
    left: 18px;
    top: 86px;
    z-index: 290;
    width: 260px;
    color: rgba(25, 30, 38, 0.88);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.16));
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(20, 28, 45, 0.13);
    padding: 12px;
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.calendar-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 20px 44px rgba(20, 28, 45, 0.2);
}

.calendar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.calendar-head span {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.calendar-head b {
    font-size: 14px;
}

.calendar-head small,
.calendar-lunar {
    color: rgba(35, 42, 55, 0.58);
    font-size: 11px;
}

.calendar-head strong {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #29f, #8b5cf6);
    box-shadow: 0 8px 18px rgba(34, 153, 255, 0.25);
}

.calendar-lunar {
    margin-bottom: 9px;
}

.calendar-week,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-week i {
    color: rgba(35, 42, 55, 0.52);
    font-size: 10px;
    font-style: normal;
    text-align: center;
}

.calendar-grid span {
    min-height: 29px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.calendar-grid b {
    font-size: 12px;
    line-height: 1;
}

.calendar-grid small {
    margin-top: 2px;
    color: rgba(35, 42, 55, 0.48);
    font-size: 8px;
    line-height: 1;
}

.calendar-grid .is-today {
    color: #fff;
    background: rgba(34, 153, 255, 0.84);
}

.calendar-grid .is-today small {
    color: rgba(255, 255, 255, 0.78);
}

.home {
    width: 50px;
    height: 50px;
    position: absolute;
    right: 70px;
    top: 10px;
    z-index: 200;
    cursor: pointer;
}

.home a {
    font-size: 20px;
    color: #999;
    line-height: 50px;
    display: block;
    text-align: center;
}

#menu {
    width: 50px;
    height: 50px;
    transform: scale(0.8);
    position: absolute;
    right: 10px;
    top: 5px;
    z-index: 2000000;
    cursor: pointer;
    transition: 0.5s;
}

#menu i {
    position: absolute;
    left: 0;
    right: 0;
    margin: 24px auto;
    width: 30px;
    height: 2px;
    background: #777;
}

#menu i:before {
    content: '';
    width: 20px;
    height: 2px;
    top: -8px;
    background: #777;
    position: absolute;
    right: 0;
}

#menu i:after {
    content: '';
    width: 20px;
    height: 2px;
    bottom: -8px;
    background: #777;
    position: absolute;
    left: 0;
}

#menu.on {
    right: 380px;
    background: #29f;
    border-radius: 25px;
    box-shadow: 0 6px 8px rgba(36, 159, 253, .3);
}

#menu.on i {
    width: 20px;
    background: #fff;
}

#menu.on i:before {
    top: -5px;
    transform: rotate(45deg);
    width: 14px;
    right: -1px;
    left: auto;
    background: #fff;
}

#menu.on i:after {
    bottom: -5px;
    transform: rotate(-45deg);
    width: 14px;
    right: -1px;
    left: auto;
    background: #fff;
}

.list {
    width: 337px;
    padding: 0 20px;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
    position: absolute;
    right: 0px;
    z-index: 2000;
    /*background: #222d46;*/
    background: rgb(41 53 80 / 0.6);
    transition: 0.3s all linear;
}

.list.closed {
    right: -380px;
}

.list ul {
    width: 330px;
    float: left;
    padding: 0 0 20px;
    margin-bottom: 20px;
}

.list ul li {
    float: left;
    margin: 5px;
    width: 100px;
    height: 30px;
    text-align: left;
    line-height: 30px;
}

.list ul li a {
    width: 100%;
    border-radius: 5px;
    transition: 0.2s all linear;
    height: 100%;
    display: block;
    color: #fff;
    font-weight: 500;
    background: #293550;
    text-align: left;
    font-size: 12px;
}

.list ul li:hover a {
    color: #fff;
    background-color: #29f;
    background-image: linear-gradient(135deg, rgba(35, 153, 255) 0%, rgba(84, 175, 253) 100%);
    box-shadow: 0 3px 3px rgba(0, 40, 70, .3);
}

.list ul li.title {
    width: 100%;
    height: 40px;
    line-height: 40px;
    margin: 30px 0 0;
    text-align: left;
    text-indent: 10px;
    /*border-bottom: 1px dashed #dedede;*/
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}


.site-icon {
    width: 16px;
    height: 16px;
    margin: 0 5px 0 8px;
    vertical-align: -3px;
    border-radius: 3px;
    object-fit: contain;
}

.site-icon-fallback {
    opacity: 0.55;
}

.category-icon {
    width: 20px;
    height: 20px;
    margin: 0 6px 0 8px;
    vertical-align: -4px;
    object-fit: contain;
}

.suggest-icon {
    display: inline-block;
    width: 15px;
    opacity: 0.5;
    text-align: center;
}

.link-admin-mask {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(5px);
}

.link-admin-panel {
    width: min(340px, calc(100vw - 36px));
    padding: 18px;
    border-radius: 18px;
    color: #1f2937;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.link-admin-panel h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.link-admin-panel label {
    display: block;
    margin: 10px 0;
    font-size: 13px;
    color: #4b5563;
}

.link-admin-panel input {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    margin-top: 6px;
    padding: 0 11px;
    border: 1px solid #d7dde7;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
}

.link-admin-panel input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.link-admin-tip {
    margin: 8px 0 14px;
    color: #6b7280;
    font-size: 12px;
}

.link-admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.link-admin-actions button {
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.link-admin-cancel {
    color: #4b5563;
    background: #eef2f7;
}

.link-admin-save {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* mini weather + calendar widgets */
.weather-card,
.calendar-card {
    position: absolute;
    left: 14px;
    z-index: 300;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    color: rgba(25, 30, 38, 0.88);
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.weather-card {
    top: 14px;
}

.calendar-card {
    top: 58px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 22px rgba(20, 28, 45, 0.1);
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.weather-card:hover,
.weather-card.weather-expanded,
.calendar-card:hover {
    transform: none;
    background: none;
    box-shadow: none;
}

.calendar-card:hover {
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 30px rgba(20, 28, 45, 0.14);
}

.calendar-card b {
    font-size: 15px;
    line-height: 1;
}

.weather-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 11px 0 9px;
    border-radius: 999px;
    color: rgba(25, 30, 38, 0.88);
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 22px rgba(20, 28, 45, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.weather-mini:hover {
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 30px rgba(20, 28, 45, 0.14);
    transform: translateY(-1px);
}

.weather-mini-icon {
    font-size: 17px;
    line-height: 1;
}

.weather-mini b {
    font-size: 15px;
    line-height: 1;
}

.weather-mini span:last-child {
    font-size: 12px;
}

.widget-modal {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.widget-modal.show {
    display: flex;
}

.widget-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 20, 0.24);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.widget-modal-panel {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 28px));
    height: min(520px, calc(100vh - 40px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.22);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.widget-modal-close {
    position: absolute;
    right: 14px;
    top: 12px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: rgba(35, 42, 55, 0.64);
    background: rgba(235, 240, 248, 0.58);
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
}

.weather-modal-card,
.calendar-modal-card,
.widget-empty {
    min-height: 100%;
    box-sizing: border-box;
    padding: 22px;
    color: #202938;
}

.weather-modal-head {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 14px;
    margin: 6px 34px 18px 0;
}

.weather-modal-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(34, 153, 255, 0.16), rgba(139, 92, 246, 0.18));
    font-size: 31px;
}

.weather-modal-head h3,
.calendar-modal-head h3,
.widget-empty h3 {
    margin: 0;
    font-size: 20px;
}

.weather-modal-head p,
.calendar-modal-head p,
.widget-empty p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.weather-modal-head strong {
    font-size: 38px;
    letter-spacing: -2px;
}

.weather-modal-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.weather-modal-stats span,
.widget-secondary,
.widget-primary {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
}

.weather-modal-stats span {
    background: rgba(238, 244, 251, 0.62);
    color: #526071;
}

.widget-actions {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
}

.widget-primary {
    color: #fff;
    background: linear-gradient(135deg, #29f, #8b5cf6);
    cursor: pointer;
}

.widget-secondary {
    color: #526071;
    background: rgba(238, 244, 251, 0.62);
    cursor: pointer;
}

.weather-modal-card h4 {
    margin: 0 0 9px;
    color: #344054;
    font-size: 13px;
}

.weather-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}

.weather-days li {
    min-width: 0;
    padding: 9px 4px;
    border-radius: 15px;
    background: rgba(243, 247, 251, 0.62);
    text-align: center;
}

.weather-days span,
.weather-days strong,
.weather-days em {
    display: block;
}

.weather-days span {
    color: #667085;
    font-size: 11px;
}

.weather-days b {
    display: block;
    margin: 4px 0;
    font-size: 18px;
}

.weather-days strong {
    color: #344054;
    font-size: 11px;
    font-weight: 600;
}

.weather-days em {
    margin-top: 3px;
    color: #667085;
    font-size: 10px;
    font-style: normal;
}

.calendar-modal-head {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 10px;
    margin: 2px 28px 15px 0;
    text-align: center;
}

.calendar-nav {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #344054;
    background: rgba(238, 244, 251, 0.62);
    font-size: 30px;
    line-height: 38px;
    cursor: pointer;
}

.calendar-modal-card .calendar-week,
.calendar-modal-card .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-modal-card .calendar-week {
    margin-bottom: 7px;
}

.calendar-modal-card .calendar-week i {
    color: #7b8493;
    font-size: 11px;
    font-style: normal;
    text-align: center;
}

.calendar-modal-card .calendar-grid span {
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(245, 248, 252, 0.58);
}

.calendar-modal-card .calendar-grid .calendar-empty {
    background: transparent;
}

.calendar-modal-card .calendar-grid b {
    font-size: 14px;
    line-height: 1;
}

.calendar-modal-card .calendar-grid small {
    margin-top: 4px;
    color: #7b8493;
    font-size: 9px;
    line-height: 1;
}

.calendar-modal-card .calendar-grid .is-today {
    color: #fff;
    background: linear-gradient(135deg, #29f, #8b5cf6);
}

.calendar-modal-card .calendar-grid .is-today small {
    color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 640px) {
    .con {
        top: 0px;
    }

    .con .shlogo {
        width: 320px;
        height: 100px;
    }

    .con .sou form .wd:focus {
        background: #f1f1f1;
        box-shadow: none;
        border-color: #ccc
    }

    .con .sou form button {
        border-radius: 25px;
    }
    .con .sou #word{max-height: 150px;}

    #menu.on {
        right: 270px;
    }

    .list {
        width: 227px;
    }

    .list ul {
        width: 220px;
    }

    .con .sou ul li {
        width: 100px;
        font-size: 12px;
        text-indent: 30px;
    }

    .home,
    #menu {
        top: 5px;
    }

    .weather-card {
        left: 10px;
        top: 10px;
        min-width: 0;
        max-width: calc(100vw - 82px);
        border-radius: 18px;
    }

    .weather-main {
        min-height: 40px;
        padding: 6px 9px;
        gap: 7px;
    }

    .weather-icon {
        width: 26px;
        height: 26px;
        font-size: 16px;
    }

    .weather-temp {
        font-size: 20px;
    }

    .weather-meta b {
        font-size: 12px;
    }

    .weather-meta small {
        font-size: 10px;
    }

    .weather-detail {
        display: none;
    }

    .weather-card.weather-expanded {
        max-width: calc(100vw - 20px);
        width: calc(100vw - 20px);
    }

    .weather-card.weather-expanded .weather-detail {
        display: block;
        max-height: 360px;
        padding: 0 10px 10px;
    }

    .weather-card.weather-expanded .weather-detail ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-card {
        left: 10px;
        top: 58px;
        width: min(240px, calc(100vw - 82px));
        max-height: 42px;
        padding: 8px 10px;
        border-radius: 18px;
        overflow: hidden;
    }

    .calendar-card:hover {
        max-height: none;
    }

    .calendar-head {
        margin-bottom: 0;
    }

    .calendar-lunar,
    .calendar-week,
    .calendar-grid {
        display: none;
    }
}

@media (max-height: 420px) {
    .con {
        margin: 0;
        top: 0px;
    }

    .con .shlogo {
        display: none;
    }

    .home,
    #menu,
    .weather-card,
    .calendar-card,
    .foot {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #162035;
    }

    .con .sou form .wd:focus {
        background: #293550;
        border: 1px solid #162035;
    }

    .con .sou form .wd {
        border: 1px solid #293550;
        color: #bbb;
    }
    .con .sou #word {
        border: 15px solid #293550;
        background: #293550;
    }
    .con .sou #word .click_work {
        color: #89b;
    }
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #222d46;
    border-radius: 0px;
}

::-webkit-scrollbar-thumb {
    background: #293550;
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: #293550;
}

::-webkit-scrollbar-corner {
    background: #222d46;
}

@media (max-width: 640px) {
    .weather-card {
        left: 10px;
        top: 10px;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    .calendar-card {
        left: 10px;
        top: 52px;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: none;
        padding: 0 11px;
        border-radius: 999px;
        overflow: visible;
    }

    .calendar-card .calendar-head,
    .calendar-card .calendar-lunar,
    .calendar-card .calendar-week,
    .calendar-card .calendar-grid {
        display: none;
    }

    .weather-mini,
    .calendar-card {
        height: 32px;
    }

    .weather-mini {
        padding: 0 10px 0 8px;
    }

    .weather-mini span:last-child {
        max-width: 44px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .widget-modal {
        align-items: center;
        justify-content: center;
        padding: 4px 10px;
    }

    .widget-modal-panel {
        width: min(560px, calc(100vw - 20px));
        height: min(520px, calc(100vh - 8px));
        max-height: calc(100vh - 8px);
        border-radius: 24px;
    }

    .weather-modal-card,
    .calendar-modal-card,
    .widget-empty {
        padding: 20px 14px 16px;
    }

    .weather-modal-head {
        grid-template-columns: 48px 1fr auto;
        gap: 10px;
        margin-right: 30px;
    }

    .weather-modal-icon {
        width: 48px;
        height: 48px;
        border-radius: 17px;
        font-size: 26px;
    }

    .weather-modal-head strong {
        font-size: 32px;
    }

    .weather-days {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-modal-head {
        margin-right: 30px;
    }

    .calendar-modal-card .calendar-grid span {
        min-height: 38px;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .widget-modal {
        padding: 3px 8px;
    }

    .widget-modal-panel {
        width: calc(100vw - 16px);
        height: min(480px, calc(100vh - 6px));
        max-height: calc(100vh - 6px);
        border-radius: 20px;
    }

    .widget-modal-close {
        right: 8px;
        top: 8px;
        width: 26px;
        height: 26px;
        font-size: 20px;
        line-height: 24px;
    }

    .weather-modal-card,
    .calendar-modal-card,
    .widget-empty {
        padding: 14px 10px 12px;
    }

    .weather-modal-head {
        grid-template-columns: 40px 1fr auto;
        gap: 8px;
        margin: 0 28px 10px 0;
    }

    .weather-modal-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 22px;
    }

    .weather-modal-head h3,
    .calendar-modal-head h3,
    .widget-empty h3 {
        font-size: 17px;
    }

    .weather-modal-head p,
    .calendar-modal-head p,
    .widget-empty p {
        font-size: 11px;
    }

    .weather-modal-head strong {
        font-size: 27px;
    }

    .weather-modal-stats {
        margin-bottom: 8px;
    }

    .weather-modal-stats span,
    .widget-secondary,
    .widget-primary {
        padding: 6px 9px;
        font-size: 11px;
    }

    .widget-actions {
        margin-bottom: 10px;
    }

    .weather-modal-card h4 {
        margin-bottom: 6px;
    }

    .weather-days {
        gap: 5px;
    }

    .weather-days li {
        padding: 6px 3px;
        border-radius: 12px;
    }

    .weather-days b {
        margin: 2px 0;
        font-size: 15px;
    }

    .weather-days span,
    .weather-days strong {
        font-size: 10px;
    }

    .weather-days em {
        font-size: 9px;
    }

    .calendar-modal-head {
        grid-template-columns: 34px 1fr 34px;
        gap: 8px;
        margin: 0 28px 10px 0;
    }

    .calendar-nav {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 25px;
        line-height: 30px;
    }

    .calendar-modal-card .calendar-week,
    .calendar-modal-card .calendar-grid {
        gap: 3px;
    }

    .calendar-modal-card .calendar-grid span {
        min-height: 32px;
        border-radius: 10px;
    }

    .calendar-modal-card .calendar-grid b {
        font-size: 12px;
    }

    .calendar-modal-card .calendar-grid small {
        margin-top: 2px;
        font-size: 8px;
    }
}

@media (max-height: 420px) {
    .weather-card,
    .calendar-card {
        display: inline-flex;
    }
}

/* final widget size normalization */
.weather-mini,
.calendar-card {
    width: 58px;
    height: 34px;
    justify-content: center;
    box-sizing: border-box;
}

.weather-mini {
    padding: 0 9px;
}

.calendar-card {
    padding: 0;
}

@media (max-width: 640px) {
    .weather-mini,
    .calendar-card {
        width: 54px;
        height: 32px;
    }
}

@media (max-width: 380px) {
    .weather-mini,
    .calendar-card {
        width: 52px;
        height: 31px;
    }
}

/* final modal unification: same frame, no empty tail, no scrollbar */
.widget-modal-panel {
    width: min(560px, calc(100vw - 28px));
    height: min(520px, calc(100vh - 40px));
    overflow: hidden;
}

#widget-modal-content,
.weather-modal-card,
.calendar-modal-card,
.widget-empty {
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

.weather-modal-card,
.calendar-modal-card {
    display: flex;
    flex-direction: column;
}

.weather-days {
    flex: 1;
    min-height: 0;
    grid-template-columns: repeat(7, 1fr);
    align-items: stretch;
}

.weather-days li {
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
}

.calendar-modal-card .calendar-grid {
    flex: 1;
    min-height: 0;
    grid-auto-rows: 1fr;
}

.calendar-modal-card .calendar-grid span {
    min-height: 0;
}

@media (max-width: 640px) {
    .widget-modal-panel {
        width: min(560px, calc(100vw - 20px));
        height: min(520px, calc(100vh - 8px));
    }

    .weather-days {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-modal-card .calendar-grid span {
        min-height: 0;
    }
}

@media (max-width: 380px) {
    .widget-modal-panel {
        width: calc(100vw - 16px);
        height: min(480px, calc(100vh - 6px));
    }
}

/* final weather forecast layout */
.weather-modal-card h4 {
    flex-shrink: 0;
}

.weather-days {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;
    align-items: stretch;
}

.weather-days li {
    min-width: 0;
    min-height: 0;
    padding: 10px 6px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.68), rgba(238,244,251,.48));
    border: 1px solid rgba(255,255,255,.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    align-items: center;
    justify-items: center;
    text-align: center;
    overflow: hidden;
}

.weather-days span,
.weather-days strong,
.weather-days em {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weather-days span {
    font-size: 11px;
    line-height: 1.1;
}

.weather-days b {
    margin: 0;
    font-size: clamp(22px, 4.3vw, 30px);
    line-height: 1;
}

.weather-days strong {
    display: -webkit-box;
    min-height: 2.4em;
    color: #344054;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.weather-days em {
    color: #667085;
    font-size: 10px;
    font-style: normal;
    line-height: 1.1;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .weather-days {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .weather-days li {
        min-height: 0;
        padding: 7px 8px;
        border-radius: 15px;
        display: grid;
        grid-template-columns: minmax(42px, .9fr) minmax(0, 1.1fr);
        grid-template-rows: auto auto;
        gap: 2px 6px;
        align-items: center;
        justify-items: center;
        text-align: center;
    }

    .weather-days span {
        grid-column: 1;
        grid-row: 1;
    }

    .weather-days b {
        grid-column: 2;
        grid-row: 1;
        font-size: clamp(20px, 6vw, 26px);
        justify-self: center;
    }

    .weather-days strong {
        grid-column: 2;
        grid-row: 2;
        min-height: 2.2em;
        font-size: 10px;
        line-height: 1.15;
        align-self: center;
    }

    .weather-days em {
        grid-column: 1;
        grid-row: 2;
        font-size: 9px;
        justify-self: center;
        align-self: center;
    }

    .weather-days span {
        align-self: center;
    }
}

@media (max-width: 380px) {
    .weather-days {
        gap: 5px;
    }

    .weather-days li {
        padding: 6px 6px;
        grid-template-columns: minmax(38px, .9fr) minmax(0, 1.1fr);
        border-radius: 12px;
    }

    .weather-days b {
        font-size: 19px;
    }

    .weather-days span,
    .weather-days strong {
        font-size: 9px;
    }

    .weather-days em {
        font-size: 8px;
    }
}
