    :root {
      --ink: #1c2333;
      --ink-soft: #5b6472;
      --line: #dfe3ea;
      --line-soft: #eef1f5;
      --paper: #ffffff;
      --canvas: #f4f6f9;
      --brand: #2a4d8f;
      --brand-deep: #1d3767;
      --brand-tint: #eaf0fb;
      --ok: #1f8a5e;
      --ok-tint: #e8f7f0;
      --warn: #ff9c4a;
      --warn-tint: #fdece2;
      --full: #9aa2b1;
      --online: #6b3fa0;
      --online-tint: #f1e9fa;
    }

    .rg-shell {
      max-width: 1040px;
      margin: 0 auto;
    }

    .rg-masthead-count {
      flex-shrink: 0;
      background: var(--brand-deep);
      border-radius: 10px;
      padding: 6px 8px;
      color: #fff;
      text-align: center;
      min-width: 76px;
    }

    .rg-masthead-count b {
      display: block;
      font-size: 18px;
      line-height: 1.1;
    }

    .rg-masthead-count span {
      font-size: 11.5px;
      opacity: 0.85;
    }

    .rg-daytabs {
      display: flex;
      gap: 8px;
      padding: 6px;
      background: var(--canvas);
      border-radius: 12px;
      margin-bottom: 20px;
    }

    .rg-daytab {
      flex: 1;
      border: none;
      background: transparent;
      border-radius: 9px;
      padding: 12px 14px;
      cursor: pointer;
      text-align: left;
      transition: background 0.15s ease, color 0.15s ease;
      color: var(--ink-soft);
      font-family: inherit;
    }

    .rg-daytab.active {
      background: var(--brand-deep);
      color: #fff;
    }

    .rg-daytab-label {
      font-size: 13px;
      font-weight: 700;
    }

    .rg-daytab-date {
      font-size: 12px;
      opacity: 0.85;
      margin-top: 2px;
    }

    .rg-daytab-count {
      display: inline-block;
      margin-top: 6px;
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.18);
    }

    .rg-daytab:not(.active) .rg-daytab-count {
      background: var(--brand-tint);
      color: var(--brand-deep);
    }

    .rg-enters {
      display: flex;
      gap: 6px;
      padding: 4px;
      background: var(--canvas);
      border: 1px solid var(--line);
      border-radius: 10px;
      margin-bottom: 20px;
      max-width: 320px;
    }

    .rg-enter-btn {
      flex: 1;
      border: none;
      background: transparent;
      border-radius: 7px;
      padding: 9px 12px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      color: var(--ink-soft);
      font-family: inherit;
      transition: background 0.15s ease, color 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .rg-enter-btn.active[data-mode="onsite"] {
      background: var(--brand-deep);
      color: #fff;
    }

    .rg-enter-btn.active[data-mode="online"] {
      background: var(--online);
      color: #fff;
    }

    .rg-enter-hint {
      font-size: 12px;
      color: var(--ink-soft);
      margin: -12px 0 20px;
    }

    .rg-modepanel {
      display: none;
    }

    .rg-modepanel.active {
      display: block;
    }

    /* Session list */
    .rg-daypanel {
      display: none;
    }

    .rg-daypanel.active {
      display: block;
    }

    .rg-session {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      margin-bottom: 10px;
      cursor: pointer;
      transition: border-color 0.15s ease, background 0.15s ease;
      background: var(--paper);
    }

    .rg-session:last-child {
      margin-bottom: 0;
    }

    .rg-session:hover {
      border-color: var(--brand);
    }

    .rg-session.selected {
      border-color: var(--brand);
      background: var(--brand-tint);
    }

    .rg-session.full {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .rg-session-time {
      flex-shrink: 0;
      width: 108px;
      font-size: 13px;
      font-weight: 700;
      color: var(--brand-deep);
      padding-top: 2px;
    }

    .rg-session-body {
      flex: 1;
      min-width: 0;
    }

    .rg-session-title {
      font-size: 14.5px;
      font-weight: 600;
      color: var(--ink);
    }

    .rg-session-meta {
      margin-top: 5px;
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      font-size: 12.5px;
      color: var(--ink-soft);
    }

    .rg-badge {
      font-size: 11.5px;
      padding: 3px 9px;
      border-radius: 999px;
      font-weight: 600;
      white-space: nowrap;
    }

    .rg-badge.ok {
      background: var(--ok-tint);
      color: var(--ok);
    }

    .rg-badge.low {
      background: var(--warn-tint);
      color: var(--warn);
    }

    .rg-badge.full {
      background: #eceef2;
      color: var(--full);
    }

    .rg-badge.online {
      background: var(--online-tint);
      color: var(--online);
    }

    .rg-check {
      flex-shrink: 0;
      width: 24px;
      height: 24px;
      border-radius: 7px;
      border: 1.5px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 2px;
      background: #fff;
      transition: all 0.15s ease;
      font-size: 14px;
      color: #fff;
    }

    .rg-session.selected .rg-check {
      background: var(--brand);
      border-color: var(--brand);
    }

    .rg-session.locked {
      opacity: 0.55;
      cursor: not-allowed;
      background: repeating-linear-gradient(45deg,
          var(--paper),
          var(--paper) 8px,
          var(--line-soft) 8px,
          var(--line-soft) 16px);
    }

    .rg-badge.locked {
      background: #eceef2;
      color: var(--ink-soft);
    }

    /* Preview */
    .rg-preview-empty {
      text-align: center;
      padding: 40px 20px;
      color: var(--ink-soft);
      font-size: 13.5px;
    }

    .rg-preview-daygroup {
      margin-bottom: 18px;
    }

    .rg-preview-daygroup:last-child {
      margin-bottom: 0;
    }

    .rg-preview-daylabel {
      font-size: 12.5px;
      font-weight: 700;
      color: var(--brand-deep);
      margin-bottom: 8px;
    }

    .rg-preview-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px 14px;
      margin-bottom: 8px;
      background: var(--canvas);
    }

    .rg-preview-item:last-child {
      margin-bottom: 0;
    }

    .rg-preview-item-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .rg-preview-item-time {
      font-size: 12px;
      color: var(--brand-deep);
      font-weight: 700;
    }

    .rg-preview-item-title {
      font-size: 13.5px;
      font-weight: 600;
      margin-top: 2px;
      color: var(--ink);
    }

    .rg-preview-item-room {
      font-size: 12px;
      color: var(--ink-soft);
      margin-top: 2px;
    }

    .rg-preview-actions {
      display: flex;
      gap: 4px;
      flex-shrink: 0;
    }

    .rg-iconbtn {
      border: none;
      background: transparent;
      width: 30px;
      height: 30px;
      border-radius: 7px;
      cursor: pointer;
      color: var(--ink-soft);
      transition: background 0.15s ease, color 0.15s ease;
      font-size: 14px;
    }

    .rg-iconbtn:hover {
      background: #fff;
      color: var(--brand-deep);
    }

    .rg-iconbtn.danger:hover {
      color: var(--warn);
    }

    .rg-preview-note {
      margin-top: 8px;
      font-size: 12.5px;
      color: var(--ink-soft);
      background: #fff;
      border: 1px dashed var(--line);
      border-radius: 8px;
      padding: 7px 10px;
    }

    .rg-note-edit {
      margin-top: 8px;
      display: flex;
      gap: 6px;
    }

    .rg-note-input {
      flex: 1;
      font-size: 12.5px;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-family: inherit;
      outline: none;
    }

    .rg-note-input:focus {
      border-color: var(--brand);
    }

    .rg-note-save {
      border: none;
      background: var(--brand-deep);
      color: #fff;
      border-radius: 8px;
      padding: 0 12px;
      font-size: 12.5px;
      cursor: pointer;
      font-weight: 600;
    }

    .rg-submit-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 18px 22px;
      border-top: 1px solid var(--line-soft);
      background: var(--canvas);
    }

    .rg-submit-bar-text {
      font-size: 12.5px;
      color: var(--ink-soft);
    }

    .rg-submit-btn {
      border: none;
      background: var(--brand-deep);
      color: #fff;
      font-weight: 700;
      font-size: 14px;
      padding: 12px 26px;
      border-radius: 10px;
      cursor: pointer;
    }

    .rg-submit-btn:hover {
      background: var(--brand);
    }

    .rg-submit-btn:disabled {
      background: var(--full);
      cursor: not-allowed;
    }

    .rg-toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--ink);
      color: #fff;
      padding: 10px 18px;
      border-radius: 999px;
      font-size: 13px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
      z-index: 50;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .rg-toast.show {
      opacity: 1;
    }

    @media (max-width: 640px) {
      .rg-daytabs {
        flex-direction: column;
      }

      .rg-session {
        flex-wrap: wrap;
      }

      .rg-session-time {
        width: auto;
      }

      .rg-masthead {
        flex-direction: column;
      }
    }

    /* modal */
    .rg-modal {
      position: fixed;
      inset: 0;
      z-index: 9999;
    }

    .rg-modal[hidden] {
      display: none;
    }

    .rg-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.45);
    }

    .rg-modal-dialog {
      position: relative;
      width: min(720px, calc(100% - 30px));
      max-height: calc(100vh - 30px);
      margin: 15px auto;
      background: #fff;
      border-radius: 14px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    }

    .rg-modal-hd {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 20px 22px;
      border-bottom: 1px solid #eee;
    }

    .rg-modal-title {
      font-size: 18px;
      font-weight: 700;
    }

    .rg-modal-sub {
      margin-top: 4px;
      color: #777;
      font-size: 13px;
    }

    .rg-modal-close {
      border: 0;
      background: transparent;
      width: 34px;
      height: 34px;
      font-size: 26px;
      line-height: 1;
      color: #777;
      cursor: pointer;
    }

    .rg-modal-close:hover {
      color: #222;
    }

    .rg-modal-bd {
      padding: 20px 22px;
      overflow-y: auto;
    }

    .rg-confirm-section {
      margin-bottom: 24px;
    }

    .rg-confirm-section:last-child {
      margin-bottom: 0;
    }

    .rg-confirm-section-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      font-size: 15px;
      font-weight: 700;
    }

    .rg-confirm-section-title span {
      font-size: 12px;
      font-weight: 500;
      padding: 4px 9px;
      background: #f1f3f5;
      border-radius: 20px;
      color: #555;
    }

    .rg-confirm-info {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      padding: 15px;
      background: #f8f9fa;
      border-radius: 10px;
    }

    .rg-confirm-info div {
      min-width: 0;
    }

    .rg-confirm-info span {
      display: block;
      margin-bottom: 3px;
      color: #777;
      font-size: 12px;
    }

    .rg-confirm-info strong {
      display: block;
      font-size: 14px;
      font-weight: 500;
      word-break: break-word;
    }

    .rg-confirm-event {
      padding: 13px 15px;
      border: 1px solid #e5e5e5;
      border-radius: 10px;
      margin-bottom: 8px;
    }

    .rg-confirm-event:last-child {
      margin-bottom: 0;
    }

    .rg-confirm-event-no {
      color: #888;
      font-size: 12px;
    }

    .rg-confirm-event-name {
      margin-top: 3px;
      font-size: 12px;
      font-weight: 600;
    }

    .rg-confirm-event-detail {
      margin-top: 5px;
      color: #666;
      font-size: 12px;
    }

    .rg-modal-ft {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 15px 22px;
      border-top: 1px solid #eee;
    }

    .rg-btn {
      border: 0;
      border-radius: 8px;
      padding: 10px 18px;
      font-size: 14px;
      cursor: pointer;
    }

    .rg-btn-secondary {
      background: #f1f3f5;
      color: #444;
    }

    .rg-btn-primary {
      background: #333;
      color: #fff;
    }

    .rg-btn-primary:hover {
      background: #222;
    }

    @media (max-width: 600px) {
      .rg-modal-dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        border-radius: 12px;
      }

      .rg-modal-hd,
      .rg-modal-bd,
      .rg-modal-ft {
        padding-left: 16px;
        padding-right: 16px;
      }

      .rg-confirm-info {
        grid-template-columns: 1fr;
      }

      .rg-modal-ft {
        flex-direction: column-reverse;
      }

      .rg-btn {
        width: 100%;
      }
    }

    .rg-confirm-box {
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      background: #fafafa;
      overflow: hidden;
      margin-top: 8px;
      margin-bottom: 8px;
    }

    .rg-confirm-title {
      padding: 12px 16px;
      font-weight: 600;
      border-bottom: 1px solid #e5e7eb;
      background: #f5f6f8;
    }

    .rg-confirm-list {
      padding: 4px 16px;
    }

    .rg-confirm-row {
      display: flex;
      align-items: flex-start;
      padding: 12px 0;
      border-bottom: 1px solid #eeeeee;
    }

    .rg-confirm-row:last-child {
      border-bottom: 0;
    }

    .rg-confirm-label {
      width: 160px;
      flex-shrink: 0;
      color: #6c757d;
    }

    .rg-confirm-value {
      flex: 1;
      font-weight: 500;
      color: #212529;
    }

    .rg-confirm-step {
      padding: 16px;
      border-left: 4px solid #6c757d;
      background: #f8f9fa;
      border-radius: 4px;
      margin-top: 8px;
      margin-bottom: 8px;
    }

    .rg-confirm-step-title {
      font-weight: 600;
      margin-bottom: 10px;
    }

    .rg-confirm-step ol {
      padding-left: 22px;
    }

    .rg-confirm-step li {
      margin-bottom: 6px;
    }

    .rg-confirm-step li:last-child {
      margin-bottom: 0;
    }


    /* Mobile */

    @media (max-width: 576px) {

      .rg-confirm-row {
        display: block;
      }

      .rg-confirm-label {
        width: auto;
        margin-bottom: 3px;
        font-size: 0.875rem;
      }

      .rg-confirm-value {
        width: 100%;
      }

    }

    .rg-confirm-box {
        overflow: hidden;
        border: 1px solid #e4e7eb;
        border-radius: 16px;
        background: #fff;
    }

    .rg-confirm-title {
        padding: 20px 28px 18px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 18px;
        font-weight: 700;
        color: #171717;
    }

    .rg-confirm-list {
        padding: 22px 28px 28px;
    }

    .rg-confirm-day {
        margin: 4px 0 10px;
        font-size: 14px;
        font-weight: 700;
        color: #244a80;
    }

    .rg-confirm-day span {
        font-weight: 600;
    }

    .rg-confirm-item {
        margin-bottom: 10px;
        padding: 13px 14px;
        border: 1px solid #dce1e7;
        border-radius: 10px;
        background: #f4f6f9;
    }

    .rg-confirm-item:last-child {
        margin-bottom: 0;
    }

    .rg-confirm-item-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 5px;
    }

    .rg-confirm-time {
        font-size: 13px;
        font-weight: 700;
        color: #243b64;
    }

    .rg-confirm-mode {
        display: inline-flex;
        align-items: center;
        padding: 3px 10px;
        border-radius: 999px;
        background: #e4f7ef;
        font-size: 12px;
        font-weight: 600;
        color: #198754;
    }

    .rg-online-mode {
        display: inline-flex;
        align-items: center;
        padding: 3px 10px;
        border-radius: 999px;
        background: #f1e9fa;
        font-size: 12px;
        font-weight: 600;
        color: #6b3fa0;
    }

    .rg-confirm-item-title {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.55;
        color: #252b35;
    }

    .rg-confirm-item-info {
        margin-top: 4px;
        font-size: 13px;
        color: #737b87;
    }

    .rg-confirm-item-info span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .rg-confirm-item-info i {
        font-size: 13px;
        color: #7b8491;
    }

    @media (max-width: 576px) {
        .rg-confirm-title {
            padding: 17px 18px 15px;
            font-size: 17px;
        }

        .rg-confirm-list {
            padding: 16px;
        }

        .rg-confirm-day {
            font-size: 13px;
        }

        .rg-confirm-item {
            padding: 12px 13px;
            border-radius: 9px;
        }

        .rg-confirm-item-meta {
            gap: 7px;
        }

        .rg-confirm-time {
            font-size: 12px;
        }

        .rg-confirm-mode {
            padding: 2px 8px;
            font-size: 11px;
        }

        .rg-confirm-item-title {
            font-size: 13px;
        }

        .rg-confirm-item-info {
            font-size: 12px;
        }
    }

    .qr-code-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 16px;
    }

    #qrcode {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 140px;
        height: 140px;
    }

    #qrcode img,
    #qrcode canvas {
        display: block;
        width: 140px !important;
        height: 140px !important;
        max-width: 100%;
        height: auto;
    }