:root {
    --ink: #12151a;
    --ink-soft: #3a4250;
    --paper: #eef1f4;
    --paper-2: #f7f8fa;
    --line: rgba(18, 21, 26, 0.1);
    --accent: #2563ff;
    --accent-deep: #1d4ed8;
    --danger: #b42318;
    --glow: rgba(37, 99, 255, 0.35);
    --shadow: 0 18px 50px rgba(18, 21, 26, 0.12);
    --radius: 18px;
    --font-display: "Figtree", "Segoe UI", sans-serif;
    --font-body: "Figtree", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: #eef6ff;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font: inherit;
}

.brand-mark {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.brand-mark--sm {
    font-size: 1.35rem;
}

.lede {
    margin: 0.65rem 0 0;
    color: var(--ink-soft);
    line-height: 1.5;
    max-width: 34ch;
}

.btn[hidden] {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-deep);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.55);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(180, 35, 24, 0.25);
    margin-right: auto;
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover {
    background: #fff;
    transform: scale(1.04);
}

.form-error {
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
    font-size: 0.92rem;
}

.status-line {
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

/* Auth */
.page-auth {
    isolation: isolate;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(42rem 30rem at -12% -8%, #5ec8ff 0%, transparent 60%),
        radial-gradient(36rem 28rem at 112% -4%, #d6ff4a 0%, transparent 56%),
        radial-gradient(34rem 26rem at 108% 112%, #3d7bff 0%, transparent 54%),
        radial-gradient(26rem 22rem at -10% 108%, #ffb703 0%, transparent 52%),
        linear-gradient(165deg, #e7f6ff 0%, #f3ffe6 48%, #fff6d6 100%);
}

.page-auth::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.28;
    background-image: radial-gradient(rgba(28, 10, 40, 0.45) 1.15px, transparent 1.15px);
    background-size: 20px 20px;
}

.auth-stage {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr min(26rem, 100%);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.auth-intro__brand {
    margin: 0;
    max-width: 8ch;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.92;
}

.auth-intro__tag {
    display: inline-block;
    margin: 1rem 0 0;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #161018;
    color: #d6ff4a;
    font-size: 0.95rem;
    font-weight: 650;
}

.auth-card {
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    border-radius: 28px;
    padding: 1.7rem 1.5rem 1.25rem;
    box-shadow: 0 22px 50px rgba(20, 50, 120, 0.16);
}

.auth-card[hidden] {
    display: none !important;
}

.auth-card h2 {
    margin: 0 0 1.15rem;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-form {
    display: grid;
    gap: 0.95rem;
}

.page-auth .btn-primary {
    width: 100%;
    margin-top: 0.15rem;
}

.page-auth .btn-primary:disabled {
    opacity: 0.65;
    transform: none;
    cursor: wait;
}

.auth-switch {
    margin: 1rem 0 0.15rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.auth-switch button {
    border: 0;
    padding: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.auth-form label,
.day-modal label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.auth-form input,
.day-modal input[type="text"],
.share-result input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input:focus,
.day-modal input[type="text"]:focus,
.share-result input:focus {
    border-color: rgba(37, 99, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 255, 0.16);
}

/* App shell */
.page-app {
    isolation: isolate;
    background:
        radial-gradient(42rem 30rem at -12% -8%, #5ec8ff 0%, transparent 60%),
        radial-gradient(36rem 28rem at 112% -4%, #d6ff4a 0%, transparent 56%),
        radial-gradient(34rem 26rem at 108% 112%, #3d7bff 0%, transparent 54%),
        radial-gradient(26rem 22rem at -10% 108%, #ffb703 0%, transparent 52%),
        linear-gradient(165deg, #e7f6ff 0%, #f3ffe6 48%, #fff6d6 100%);
}

.page-app::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.28;
    background-image: radial-gradient(rgba(28, 10, 40, 0.45) 1.15px, transparent 1.15px);
    background-size: 20px 20px;
}

.app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-bar__brand {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-bar__user {
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.has-app-nav {
    padding-bottom: 4.75rem;
}

.app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(22, 12, 32, 0.92);
    backdrop-filter: blur(16px);
    border-top: 0;
    padding: 0.4rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
}

.app-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    padding: 0.3rem 0.2rem;
}

.app-nav__item svg {
    width: 1.35rem;
    height: 1.35rem;
}

.app-nav__item.is-active {
    color: #d6ff4a;
    font-weight: 700;
}

.calendar-page {
    width: min(1100px, calc(100% - 2rem));
    margin: 1.25rem auto 3rem;
}

#outfit-calendar {
    width: 100%;
    margin: 0 auto 1.5rem;
    border-radius: 28px;
    box-shadow: 0 22px 50px rgba(20, 50, 120, 0.14);
    --vc-bg: rgba(255, 255, 255, 0.94);
    --vc-color: #14120f;
    --vc-header-color: #14120f;
    --vc-title-color: #14120f;
    --vc-week-day-color: #14120f;
    --vc-date-color: #14120f;
    --vc-date-today-bg: #e4efff;
    --vc-date-today-color: #1d4ed8;
    --vc-date-hover-bg: rgba(37, 99, 255, 0.08);
    --vc-focus-outline-color: #2563ff;
}

#outfit-calendar,
#outfit-calendar [data-vc="column"] {
    width: 100%;
}

#outfit-calendar .vc-month,
#outfit-calendar .vc-year {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
}

#outfit-calendar .vc-week__day {
    font-size: 0.95rem;
    font-weight: 650;
}

#outfit-calendar .vc-date {
    overflow: hidden;
}

#outfit-calendar [data-vc-date-btn] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    width: 100%;
    min-height: 3.2rem;
    padding: 0.4rem 0.28rem 0.35rem;
    border-radius: 14px;
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    font-weight: 600;
    line-height: 1;
}

#outfit-calendar .outfit-mark {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    max-width: none;
    flex: none;
    border-radius: 12px;
    object-fit: cover;
    object-position: center top;
    background: #e7f3ff;
    display: block;
    pointer-events: none;
}

#outfit-calendar .outfit-mark.is-cutout {
    object-fit: contain;
    object-position: center center;
}

#outfit-calendar .outfit-mark[hidden] {
    display: none !important;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.35rem;
}

.avatar-picker {
    position: relative;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.avatar-picker__face {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background:
        linear-gradient(#f4fbff, #f4fbff) padding-box,
        linear-gradient(135deg, #3d7bff, #d6ff4a 55%, #ffb703) border-box;
    color: #1d4ed8;
    border: 3px solid transparent;
    box-shadow: 0 10px 28px rgba(18, 21, 26, 0.12);
    font-family: var(--font-display);
    font-size: 2.4rem;
}

.avatar-picker__face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.avatar-picker__face img:not([hidden]) {
    display: block;
}

.avatar-picker__edit {
    position: absolute;
    right: 0;
    bottom: 0.15rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #161018;
    color: #d6ff4a;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-name {
    margin: 0.7rem 0 0;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
}

.profile-hero .status-line {
    margin: 0.45rem 0 0;
    text-align: center;
}

.month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.month-label {
    margin: 0;
    min-width: 14ch;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.month-label--static {
    margin-bottom: 1.25rem;
    text-align: center;
}

.span-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: fit-content;
    margin: -0.35rem auto 1.15rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.span-picker select {
    border: 0;
    border-radius: 999px;
    padding: 0.4rem 1.8rem 0.4rem 0.85rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2314120f' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") right 0.7rem center / 0.65rem no-repeat;
    color: var(--ink);
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.92rem;
    appearance: none;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(20, 18, 15, 0.08);
}

.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

.weekday-row[hidden] {
    display: none;
}

.weekday-row--month {
    margin: 0.15rem 0 0.65rem;
    color: #14120f;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.45rem;
}

.calendar-grid--week {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.7rem;
}

.calendar-grid--month {
    grid-template-columns: repeat(7, 1fr);
    gap: 0.85rem 0.15rem;
}

.month-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.08rem;
    min-height: 4.4rem;
    border: 0;
    border-radius: 12px;
    padding: 0.3rem 0.05rem 0.35rem;
    background: transparent;
    color: #14120f;
    cursor: pointer;
}

.month-day.is-pad {
    pointer-events: none;
}

.month-day__num {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    color: #14120f;
}

.month-day__dow {
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5c564e;
    line-height: 1;
}

.month-day.is-today {
    background: #e4efff;
}

.month-day.is-today .month-day__num,
.month-day.is-today .month-day__dow {
    color: #1d4ed8;
}

.month-day__photo {
    width: 1.7rem;
    height: 1.7rem;
    margin-top: 0.15rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.month-day__photo[hidden] {
    display: none;
}

.month-day.is-today.has-photo .month-day__photo {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #2563ff;
}

.month-day:hover {
    background: rgba(20, 18, 15, 0.05);
}

.day-cell {
    position: relative;
    aspect-ratio: 1 / 1.15;
    border: 0;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    animation: rise 0.45s ease both;
}

.day-cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: #fff;
}

.day-cell.is-empty {
    opacity: 0;
    pointer-events: none;
}

.calendar-grid--week .day-cell {
    aspect-ratio: 4 / 5;
    border-radius: 16px;
}

.day-cell.is-today {
    outline: 2px solid rgba(37, 99, 255, 0.7);
    outline-offset: 1px;
}

.day-cell__num {
    position: absolute;
    top: 0.45rem;
    left: 0.55rem;
    z-index: 1;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.calendar-grid--week .day-cell__num {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    top: 0.4rem;
    left: 0.4rem;
    padding: 0.28rem 0.42rem 0.3rem;
    border-radius: 10px;
    background: rgba(246, 241, 234, 0.94);
    color: #14120f;
    line-height: 1;
    text-shadow: none;
}

.day-cell__dow {
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1d4ed8;
}

.day-cell__date {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: #14120f;
}

.day-cell.has-outfit .day-cell__num,
.day-cell.is-today .day-cell__num {
    color: #14120f;
    text-shadow: none;
}

.day-cell.is-open {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(231, 243, 255, 0.96));
    box-shadow: inset 0 0 0 1.5px rgba(37, 99, 255, 0.16);
}

.day-cell.is-open:hover {
    box-shadow: inset 0 0 0 1.5px rgba(37, 99, 255, 0.4), var(--shadow);
}

.day-cell__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    pointer-events: none;
}

.day-cell__mark {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 50%;
    background: #161018;
    color: #d6ff4a;
}

.day-cell__mark svg {
    width: 1.55rem;
    height: 1.55rem;
}

.day-cell__hint {
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.day-cell__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.35s ease;
}

.day-cell__img[hidden] {
    display: none;
}

.day-cell:hover .day-cell__img {
    transform: scale(1.08);
}

.day-cell__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.4rem 0.45rem 0.4rem;
    background: linear-gradient(transparent, rgba(10, 14, 18, 0.7));
    color: #fff;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-grid--readonly .day-cell {
    cursor: default;
}

.calendar-grid--readonly .day-cell:hover {
    transform: none;
    box-shadow: none;
}

/* Share lookbook */
.page-share {
    padding-bottom: 5.5rem;
}

.page-share .calendar-page {
    width: min(980px, calc(100% - 1.25rem));
}

.avatar-modal {
    width: min(420px, calc(100% - 2rem));
    border: 0;
    border-radius: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 60px rgba(20, 50, 120, 0.22);
}

.avatar-modal::backdrop {
    background: rgba(18, 32, 64, 0.42);
    backdrop-filter: blur(6px);
}

.avatar-modal form {
    display: grid;
    gap: 0.9rem;
    padding: 1.15rem 1.2rem 1.25rem;
}

.avatar-crop {
    display: grid;
    gap: 0.85rem;
}

.avatar-crop__stage {
    position: relative;
    width: min(100%, 18rem);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    background: #e7f3ff;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(37, 99, 255, 0.35),
        0 18px 40px rgba(20, 50, 120, 0.16);
}

.avatar-crop__stage.is-dragging {
    cursor: grabbing;
}

.avatar-crop__stage img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.avatar-crop__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.avatar-crop__zoom {
    display: grid;
    gap: 0.35rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.avatar-crop__zoom input {
    width: 100%;
    accent-color: var(--accent);
}

.share-island {
    position: fixed;
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: min(16rem, calc(100vw - 1.7rem));
    padding: 0.4rem 0.85rem 0.4rem 0.4rem;
    border-radius: 999px;
    background: rgba(22, 16, 24, 0.92);
    color: #fff;
    box-shadow: 0 16px 40px rgba(18, 32, 64, 0.28);
    backdrop-filter: blur(14px);
    animation: rise 0.45s ease both;
}

.share-island__face {
    position: relative;
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background:
        linear-gradient(#f4fbff, #f4fbff) padding-box,
        linear-gradient(135deg, #3d7bff, #d6ff4a 55%, #ffb703) border-box;
    border: 2px solid transparent;
    color: #1d4ed8;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.share-island__face img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.share-island__letter {
    line-height: 1;
}

.share-island__meta {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.share-island__label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.share-island__name {
    color: #d6ff4a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weekday-row--share {
    color: var(--ink);
    font-weight: 650;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.share-day {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px rgba(20, 50, 120, 0.08);
    animation: rise 0.4s ease both;
}

.share-day.is-pad {
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
    background: transparent;
}

.share-day.is-blank {
    background: rgba(255, 255, 255, 0.72);
}

.share-day.has-outfit {
    background: #161018;
}

.share-day.is-cutout.has-outfit {
    background: #e7f3ff;
}

.share-day__num {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    z-index: 2;
    min-width: 1.35rem;
    padding: 0.18rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #14120f;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.share-day__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.share-day__img[hidden] {
    display: none !important;
}

.share-day.is-cutout .share-day__img {
    object-fit: contain;
    object-position: center center;
    padding: 0.45rem 0.25rem 0.3rem;
    box-sizing: border-box;
    background: #e7f3ff;
}

.share-day__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.2rem 0.4rem 0.4rem;
    background: linear-gradient(transparent, rgba(10, 14, 18, 0.72));
    color: #fff;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 860px) {
    .share-grid {
        gap: 0.3rem;
    }

    .share-day {
        border-radius: 10px;
    }

    .share-day__num {
        top: 0.22rem;
        left: 0.22rem;
        font-size: 0.64rem;
        padding: 0.14rem 0.28rem;
    }

    .share-day.is-cutout .share-day__img {
        padding: 0.2rem 0.1rem 0.1rem;
    }
}

/* Modal */
.day-modal,
.share-modal {
    width: min(420px, calc(100% - 2rem));
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
    border: 0;
    border-radius: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 60px rgba(20, 50, 120, 0.22);
}

.day-modal::backdrop,
.share-modal::backdrop {
    background: rgba(18, 32, 64, 0.42);
    backdrop-filter: blur(6px);
}

.day-modal form,
.share-modal form {
    display: grid;
    gap: 0.9rem;
    padding: 1.15rem 1.2rem 1.25rem;
}

.day-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.day-modal__dow {
    margin: 0 0 0.1rem;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.day-modal__header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.photo-drop {
    position: relative;
    display: grid !important;
    place-items: center;
    min-height: 16rem;
    aspect-ratio: 3 / 4;
    border: 1.5px dashed rgba(37, 99, 255, 0.45);
    border-radius: 22px;
    background: linear-gradient(165deg, #e7f6ff 0%, #f3ffe6 62%, #fff6d6 100%);
    color: #1d4ed8;
    overflow: hidden;
    cursor: pointer;
}

.photo-drop.is-pending {
    background: #e7f3ff;
}

.photo-drop.has-photo {
    border-style: solid;
    border-color: transparent;
    background: #eef6ff;
}

.photo-drop.is-cutout.has-photo {
    background: #e7f3ff;
}

.photo-drop__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    max-width: 16rem;
    padding: 1rem;
    text-align: center;
    pointer-events: none;
}

.photo-drop.is-pending .photo-drop__empty,
.photo-drop.has-photo .photo-drop__empty {
    display: none;
}

.photo-drop__mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #161018;
    color: #d6ff4a;
    font-size: 1.8rem;
    line-height: 1;
}

#file-label {
    font-size: 1rem;
    font-weight: 600;
    color: #14120f;
}

.photo-drop__hint {
    color: #5c564e;
    font-size: 0.8rem;
}

.photo-drop.has-photo::after {
    content: "Change photo";
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    z-index: 1;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #161018;
    color: #d6ff4a;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.photo-drop input {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    cursor: pointer;
}

.photo-drop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-drop.is-cutout.has-photo img {
    object-fit: contain;
}

.photo-drop img[hidden] {
    display: none;
}

.day-cell.has-cutout {
    background-color: #ddd;
    background-image:
        linear-gradient(45deg, #cfcfcf 25%, transparent 25%),
        linear-gradient(-45deg, #cfcfcf 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #cfcfcf 75%),
        linear-gradient(-45deg, transparent 75%, #cfcfcf 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.field-hint {
    margin: -0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-soft);
    line-height: 1.4;
}

.check-field {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    grid-template-columns: none;
}

.check-field input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--accent);
}

.day-modal__actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.share-result {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state h1 {
    font-family: var(--font-display);
    font-weight: 500;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-4%, -3%, 0); }
}

@media (max-width: 860px) {
    .auth-stage {
        grid-template-columns: 1fr;
        align-content: space-between;
        align-items: stretch;
        min-height: 100vh;
    }

    .auth-intro__brand {
        font-size: clamp(2.7rem, 12vw, 3.6rem);
    }

    .weekday-row {
        font-size: 0.65rem;
    }

    .day-cell {
        border-radius: 10px;
    }

    .calendar-grid--week {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .calendar-grid--week .day-cell__num {
        top: 0.28rem;
        left: 0.28rem;
        padding: 0.22rem 0.32rem 0.24rem;
    }

    .day-cell__date {
        font-size: 0.95rem;
    }

    .calendar-grid--week .day-cell__mark {
        width: 2.1rem;
        height: 2.1rem;
    }

    .calendar-grid--week .day-cell__mark svg {
        width: 1.1rem;
        height: 1.1rem;
    }

    .calendar-grid--week .day-cell__hint {
        font-size: 0.58rem;
        letter-spacing: 0.06em;
    }

    .calendar-grid--month {
        gap: 0.55rem 0.05rem;
    }

    .month-day {
        min-height: 3.5rem;
        padding-top: 0.2rem;
    }

    .month-day__num {
        font-size: 0.95rem;
    }

    .month-day__dow {
        font-size: 0.52rem;
        letter-spacing: 0.02em;
    }

    .month-day__photo {
        width: 1.25rem;
        height: 1.25rem;
    }

    .photo-drop {
        min-height: 12rem;
        aspect-ratio: 4 / 5;
    }

    .day-cell__caption {
        display: none;
    }
}

@media (max-width: 520px) {
    .calendar-grid,
    .weekday-row {
        gap: 0.28rem;
    }

    .share-result {
        grid-template-columns: 1fr;
    }
}
