@charset "utf-8";

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
    --cal-text: #1a3a5c;
    --cal-text-muted: #2a5a8c;
    --cal-accent: #00aacc;
    --cal-border: rgba(0, 150, 200, 0.3);
}

.unified-wrapper {
    background: transparent;
    padding: 0px;
    min-height: 100vh;
    box-sizing: border-box;
    font-family: "Mona12", "Pretendard Variable", "Pretendard", sans-serif;
    color: var(--cal-text);
    align-content: center;
}

.calendar-header {
    display: flex;
    align-items: center;
}

.calendar-header .title {
    font-size: 1.6em;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-mv {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: none;
}

.calendar-header .btn-mv:first-child::after {
    content: '◀';
    display: block;
    transform: none;
}

.calendar-header .btn-mv:last-child::after {
    content: '▶';
    display: block;
    transform: none;
}

.calendar-header .btn-mv:first-child:hover::after,
.calendar-header .btn-mv:last-child:hover::after {
    color: white;
}

.parchment-area {
    background: transparent;
}

.week-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    padding-bottom: 10px;
}
.week-days div {
    font-size: 0.85em;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
}
.week-days div:first-child {
    color: #cc4444;
}
.week-days div:last-child {
    color: #2266cc;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    height: auto !important;
    background: transparent;
}

.day {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    height: 100%;
    min-height: 0;
    padding: 6px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.day:hover {
    background: rgba(100, 255, 218, 0.08);
    border-color: var(--cal-border);
    transform: translateY(-2px);
}

.day.empty {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: default;
    pointer-events: none;
    opacity: 0.3;
}

.day.empty::after {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.05);
    font-size: 1.5em;
    font-weight: 100;
}

.day.today {
    background: rgba(100, 200, 218, 0.3);
    border: 1px solid var(--cal-accent);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.1);
}
.day.selected {
    background: rgba(100, 255, 218, 0.15) !important;
    border-color: var(--cal-accent);
}

.date-num {
    margin-bottom: 4px;
}
.day.today .date-num {
    color: #0077aa;
    font-weight: 700;
}
.days-grid > div:nth-child(7n+1) .date-num {
    color: #cc4444;
}
.days-grid > div:nth-child(7n) .date-num {
    color: #2266cc;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-indicators {
    display: none;
    gap: 3px;
    margin-top: auto;
    justify-content: center;
    flex-wrap: wrap;
}

.evt {
    display: block;
    width: 100%;
    padding: 2px 5px;
    font-size: 0.8em;
    color: #1a3a5c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.6);
    border-left: 3px solid transparent;
    transition: transform 0.2s;
}
.evt:hover {
    transform: translateX(2px);
    opacity: 0.9;
}

.m-bar {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 4px currentColor;
}

.evt.type-1 {
    border-left-color: #b39ddb;
    background: rgba(179, 157, 219, 0.4);
}
.evt.type-2 {
    border-left-color: #80cbc4;
    background: rgba(128, 203, 196, 0.4);
}
.evt.type-3 {
    border-left-color: #ef9a9a;
    background: rgba(239, 154, 154, 0.4);
}
.evt.type-4 {
    border-left-color: #ffe082;
    background: rgba(255, 224, 130, 0.4);
}
.evt.type-5 {
    border-left-color: #b0bec5;
    background: rgba(176, 190, 197, 0.4);
}
.evt.type-6 {
    border-left-color: #90caf9;
    background: rgba(144, 202, 249, 0.4);
}
.evt.type-7 {
    border-left-color: #a5d6a7;
    background: rgba(165, 214, 167, 0.4);
}
.evt.type-8 {
    border-left-color: #f48fb1;
    background: rgba(244, 143, 177, 0.4);
}
.evt.type-9 {
    border-left-color: #ffcc80;
    background: rgba(255, 204, 128, 0.4);
}
.evt.type-10 {
    border-left-color: #ef5350;
    background: rgba(239, 83, 80, 0.4);
}

.m-bar.type-1 {
    background: #b39ddb;
    color: #b39ddb;
}
.m-bar.type-2 {
    background: #80cbc4;
    color: #80cbc4;
}
.m-bar.type-3 {
    background: #ef9a9a;
    color: #ef9a9a;
}
.m-bar.type-4 {
    background: #ffe082;
    color: #ffe082;
}
.m-bar.type-5 {
    background: #b0bec5;
    color: #b0bec5;
}
.m-bar.type-6 {
    background: #90caf9;
    color: #90caf9;
}
.m-bar.type-7 {
    background: #a5d6a7;
    color: #a5d6a7;
}
.m-bar.type-8 {
    background: #f48fb1;
    color: #f48fb1;
}
.m-bar.type-9 {
    background: #ffcc80;
    color: #ffcc80;
}
.m-bar.type-10 {
    background: #ef5350;
    color: #ef5350;
}

#calendar-event-list {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    border-left: 2px solid var(--cal-accent);
}

.list-item:last-child {
    border-bottom: none;
}
.list-item .dot {
    background: var(--cal-text-muted);
}

.calendar-footer-controls {
    margin-top: 15px;
    text-align: right;
}
.btn-refresh {
    background: transparent;
    border: none;
    color: var(--cal-text-muted);
    font-size: 0.8em;
    cursor: pointer;
}
.btn-refresh:hover {
    color: var(--cal-accent);
    text-decoration: underline;
}

.is-mobile-view .days-grid {
    height: auto !important;
    grid-template-rows: none !important;
    grid-auto-rows: 43px;
    gap: 4px;
}
.is-mobile-view .day {
    min-height: 60px;
    height: auto;
    padding: 4px;
}
.is-mobile-view .event-list {
    display: none !important;
}
.is-mobile-view .mobile-indicators {
    display: flex !important;
}

.is-iframe-mode::-webkit-scrollbar {
    width: 4px;
}
.is-iframe-mode::-webkit-scrollbar-thumb {
    background: var(--cal-border);
}

.trpg-board-wrap .unified-wrapper {
    padding: 0;
    min-height: 0;
    align-content: normal;
    color: var(--text-primary);
}

.calendar-month-panel, .calendar-week-panel {
    color: var(--text-primary);
}

.calendar-month-panel .week-days div {
    text-shadow: none;
}

.calendar-month-panel .week-days {
    border-bottom-color: var(--line-light);
}

.calendar-month-panel .day {
    border-color: var(--line-light);
}

.calendar-month-panel #calendar-event-list {
    border-left-color: var(--accent);
}

@media (max-width: 768px) {

.calendar-month-panel, .calendar-week-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}
}

