:root {
  --primary: #1a73e8;
  --surface: #ffffff;
  --border: #d7dce0;
  --text: #1f1f1f;
  --muted: #6b7280;
    }

    .calendar-wrapper {
      max-width: 1080px;
      margin: 0 auto;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 12px 30px rgba(26, 115, 232, 0.08);
      overflow: hidden;
    }

    .calendar-header {
      display: grid;
      grid-template-columns: 60px 1fr 60px;
      align-items: center;
      padding: 12px 16px;
      background: linear-gradient(90deg, #e8f1fd 0%, #f7fbff 100%);
      border-bottom: 1px solid var(--border);
    }

    .calendar-header button {
      height: 40px;
      border: 1px solid var(--border);
      background: var(--surface);
      border-radius: 10px;
      color: var(--text);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .calendar-header button:hover:not(:disabled) {
      border-color: var(--primary);
      color: var(--primary);
      box-shadow: 0 8px 20px rgba(26, 115, 232, 0.15);
    }

    .calendar-header button:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .calendar-title {
      text-align: center;
      font-weight: 700;
      font-size: 1.5rem;
      letter-spacing: 0.4px;
      color: #161616;
    }

    .calendar-table {
      padding: 16px;
    }

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

    .calendar-weekdays .weekday {
      background: #f5f7fb;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
      color: var(--muted);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 12px 8px;
      text-align: center;
      border-bottom: 1px solid var(--border);
    }

    .calendar-cell {
      min-height: 120px;
      border: 1px solid var(--border);
      border-top: 0;
      border-left: 0;
      background: var(--surface);
      position: relative;
      padding: 10px 8px 12px;
      transition: background 0.2s ease, box-shadow 0.2s ease;
    }
    
    .calendar-cell.weekday {
    	min-height: 40px !important;
    }

    .calendar-row .calendar-cell:first-child {
      border-left: 1px solid var(--border);
    }

    .calendar-row:last-child .calendar-cell {
      border-bottom: 1px solid var(--border);
    }

    .calendar-cell:not(.empty):hover {
      background: #f9fbff;
      box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.08);
    }

    .adjacent-month {
      background: #f8fafc;
    }

    .date-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
    }

    .date-number {
      font-size: 0.95rem;
      font-weight: 700;
      color: #111827;
    }

    .event-count {
      display: none;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--primary);
      background: #eef4ff;
      border: 1px solid #dbe7ff;
      padding: 2px 8px;
      border-radius: 999px;
      line-height: 1.2;
    }

    .cell-items {
      display: flex;
      flex-direction: column;
      gap: 6px;
      outline: none;
    }

    .cell-item {
      padding: 8px 10px;
      border-radius: 8px;
      background: #f4f7fb;
      border: 1px solid transparent;
      cursor: pointer;
      line-height: 1.35;
      transition: all 0.2s ease;
    }

    .cell-item:hover {
      background: #e8f1fd;
    }

    .cell-item[data-url]::after {
      content: "↗";
      margin-left: 8px;
      font-size: 0.8rem;
      color: var(--primary);
    }

    .popup-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 999;
      padding: 24px;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .popup-overlay.visible {
      visibility: visible;
      opacity: 1;
    }

    .popup-window {
      width: min(960px, 100%);
      height: min(80vh, 680px);
      background: #161616;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
      position: relative;
      padding-bottom: 30px;
    }

    .popup-window iframe {
      width: 100%;
      height: 100%;
      border: none;
      background: #161616;
    }

    .popup-close {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(255, 255, 255, 0.15);
      border: 0;
      color: #000;
      padding: 8px 10px;
      border-radius: 50%;
      cursor: pointer;
      font-weight: 700;
    }

    .popup-action-bar {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0px;
      display: flex;
      justify-content: center;
      padding: 5px 0;
      background: #fff;
    }

    .open-article-button {
      pointer-events: auto;
      padding: 10px 18px;
      border-radius: 999px;
      background: #e2ded3;
      color: #161616;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
      backdrop-filter: blur(6px);
    }

    .open-article-button:hover {
      background: #3a6fcb;
    }

    .open-article-button:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .mobile-tip {
      display: none;
      margin-top: 8px;
    }

    @media (max-width: 768px) {
      .calendar-header {
        grid-template-columns: 46px 1fr 46px;
      }

      .calendar-cell {
        min-height: 96px;
        padding: 8px 6px 10px;
        cursor: pointer;
      }

      .cell-items {
        display: none;
      }

      .calendar-cell.expanded .cell-items {
        display: flex;
      }

      .calendar-cell.expanded {
        box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.25);
      }

      .event-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
      }

      .mobile-tip {
        display: block;
      }
    }
