/* 4×2 白色透明底日签组件：按原稿保留视觉与内部布局，仅限定在组件根节点内，避免污染其它页面。 */
#widget-daily-sign.widget-4x2 {
    position: relative;
    width: 380px;
    height: 190px;
    background-color: #ffffff;
    background-size: cover;
    background-position: center;
    border-radius: 28px;
    padding: 10px 18px 7px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* 改为平铺的上下两行，避免 space-between 把日期栏推到卡片外。 */
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.055), 0 1px 3px rgba(0, 0, 0, 0.025);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: background 0.3s ease;
}

#widget-daily-sign .bg-change-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0, 0, 0, 0.06);
    color: #666;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0.6;
    user-select: none;
}

#widget-daily-sign:hover .bg-change-btn { opacity: 1; }
#widget-daily-sign .bg-change-btn:hover { background: rgba(0, 0, 0, 0.15); color: #222; }

#widget-daily-sign .doodle {
    position: absolute;
    color: #888888;
    font-family: Arial, sans-serif;
    pointer-events: none;
    user-select: none;
}

#widget-daily-sign .doodle-dot-left { top: 20px; left: 35px; font-size: 20px; font-weight: bold; }
#widget-daily-sign .doodle-dot-right { top: 25px; right: 45px; font-size: 18px; font-weight: bold; }
#widget-daily-sign .doodle-circle-left { bottom: 48px; left: 25px; font-size: 14px; }
#widget-daily-sign .doodle-circle-right { bottom: 48px; right: 25px; font-size: 14px; }

#widget-daily-sign .content-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-top: -2px;
    min-height: 80px;
    padding: 0 8px;
    box-sizing: border-box;
    z-index: 2;
}

#widget-daily-sign .avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 2px solid #ffffff;
    overflow: hidden;
    background-color: #f5f5f5;
}

#widget-daily-sign .avatar-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
#widget-daily-sign .avatar-wrapper:hover .avatar-img { transform: scale(1.05); }
#widget-daily-sign .avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#widget-daily-sign .avatar-wrapper:hover .avatar-overlay { opacity: 1; }

#widget-daily-sign .text-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #444444;
}

#widget-daily-sign .editable-text {
    outline: none;
    border-radius: 4px;
    padding: 1px 4px;
    transition: background 0.2s;
}

#widget-daily-sign .editable-text:hover,
#widget-daily-sign .editable-text:focus { background-color: rgba(0, 0, 0, 0.04); }
#widget-daily-sign .text-title { font-size: 14px; font-weight: 600; color: #222222; margin-bottom: 2px; }
#widget-daily-sign .text-korean { font-size: 14px; color: #555555; margin-bottom: 4px; letter-spacing: 0.5px; }
#widget-daily-sign .text-english { font-size: 12.5px; color: #666666; letter-spacing: 0.3px; margin-bottom: 2px; font-family: "Quicksand", -apple-system, sans-serif; }
#widget-daily-sign .text-ribbon { font-size: 13px; color: #333333; }

#widget-daily-sign .week-bar {
    width: 100%;
    height: 35px;
    flex: 0 0 35px;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid #ebebeb;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    z-index: 2;
}

#widget-daily-sign .day-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 10.5px;
    font-weight: 500;
    color: #888888;
    padding: 4px 2px;
    border-radius: 9px;
    letter-spacing: 0.25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

#widget-daily-sign .day-item.active {
    background-color: #dedede;
    color: #111111;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: scale(1.06);
}

#widget-daily-sign #avatar-input,
#widget-daily-sign #bg-input { display: none; }

/* 桌面网格和组件库都以 4×2 的原始比例容纳它。 */
.desktop-layout-item > .widget-4x2,
.desktop-widget-preview-content.widget-4x2 {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 1 !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

.desktop-layout-item > .widget-4x2 {
    height: auto !important;
    align-self: start;
}
