/* 纪念日小组件：网格里的一个方块，尺寸跟图标一致 */

.mcard-tile {
    position: relative;
    width: var(--icon);
    height: var(--icon);
    border: 0;
    border-radius: var(--icon-radius);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font: inherit;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(18, 24, 38, .16);
    transition: transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s ease;
}

.mcard-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(18, 24, 38, .22);
}

.mcard-tile-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 12, 20, .26), rgba(8, 12, 20, .04) 44%, rgba(8, 12, 20, .34));
}

.mcard-tile-days {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .38);
}

.mcard-tile-unit {
    position: relative;
    font-size: 9px;
    line-height: 1;
    opacity: .86;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .42);
}

.app-cell.app-card.is-dragging .mcard-tile {
    box-shadow: 0 16px 32px rgba(18, 24, 38, .28);
    transform: scale(1.06);
}

/*
 * 卡片格子对齐：
 * 1) .app 是 flex 居中，button 默认 inline-block 会贴在 112px 格子左边 —— 必须也居中
 * 2) .app 上面有 2px 内边距、下面有 17px 名字行，卡片没有名字行，用 padding 补回来
 */
.app-cell.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 0 0;
}

/* 名字跟图标一样落在方块下面 */
.app-cell.app-card .app-name {
    margin-top: 9px;
}

/* 双击名字就地改名 */
.card-name-input {
    width: 100%;
    padding: 1px 4px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .9);
    font: inherit;
    font-size: 12.5px;
    text-align: center;
    color: var(--mn-text);
    outline: 1px solid var(--accent);
}
