/* Native RM dashboard — inherit hotel-cm dark tokens, remap table-head color aliases */
#view-rm {
      --table-head: var(--table-head-bg);
      --table-head-text: var(--table-head-fg);
      --surface-2: var(--bg-subtle);
    }
#view-rm {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }
#view-rm .topbar {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 0 24px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: var(--shadow-sm);
    }
#view-rm .brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }
#view-rm .brand-icon {
      width: 32px; height: 32px;
      background: var(--accent);
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      color: var(--on-accent); font-weight: 700; font-size: 0.75rem;
    }
#view-rm .brand h1 { font-size: 1rem; font-weight: 600; color: var(--text); }
#view-rm .brand .subtitle { font-size: 0.75rem; color: var(--muted); margin-top: 1px; }
#view-rm .live {
      display: flex; align-items: center; gap: 8px;
      font-size: 0.78rem; color: var(--text-secondary);
      background: var(--bg-subtle);
      padding: 6px 14px;
      border-radius: 999px;
      border: 1px solid var(--border);
    }
#view-rm .topbar-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
#view-rm .room-type-picker {
      display: flex;
      align-items: center;
      gap: 6px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 4px 6px 4px 10px;
      max-width: min(100vw - 120px, 300px);
    }
#view-rm .room-type-picker button {
      border: none;
      background: transparent;
      color: var(--muted);
      width: 28px;
      height: 28px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 1.1rem;
      line-height: 1;
      flex-shrink: 0;
    }
#view-rm .room-type-picker button:hover { background: var(--surface-2); color: var(--text); }
#view-rm .room-type-label-wrap { min-width: 0; text-align: center; flex: 1; }
#view-rm .room-type-label {
      display: block;
      font-size: 0.82rem;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
#view-rm .pricing-mode-chip {
      font-size: 0.68rem;
      color: var(--muted);
      background: var(--surface-2);
      border: 1px dashed var(--border);
      border-radius: 8px;
      padding: 6px 10px;
      line-height: 1.35;
      max-width: 220px;
    }
#view-rm .pricing-mode-chip strong {
      display: block;
      color: var(--text);
      font-size: 0.72rem;
      font-weight: 600;
    }
#view-rm .dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 0 3px var(--success-soft);
      animation: pulse 2s infinite;
    }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
#view-rm .wrap { max-width: 1480px; margin: 0 auto; padding: 24px; }
#view-rm .cards {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
      margin-bottom: 12px;
      align-items: stretch;
    }
@media (max-width: 1100px) {#view-rm .cards { grid-template-columns: repeat(3, 1fr); }}
@media (max-width: 640px) {#view-rm .cards { grid-template-columns: repeat(2, 1fr); }}
#view-rm .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 12px 14px;
      box-shadow: var(--shadow-sm);
      transition: box-shadow .2s, border-color .2s;
      display: flex;
      flex-direction: column;
      min-height: 100%;
      height: 100%;
    }
#view-rm .card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
#view-rm .card .label {
      font-size: 0.72rem; font-weight: 500;
      color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
    }
#view-rm .card .value {
      font-size: 1.75rem; font-weight: 700; margin-top: 6px;
      color: var(--text); font-variant-numeric: tabular-nums;
    }
#view-rm .card .sub {
      font-size: 0.78rem;
      color: var(--text-secondary);
      margin-top: auto;
      padding-top: 8px;
      min-height: 2.4em;
      line-height: 1.2;
    }
#view-rm .card.accent .value { color: var(--accent-fg); }
#view-rm .progress-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 24px;
      margin-bottom: 20px;
      box-shadow: var(--shadow-sm);
    }
#view-rm .progress-head {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 12px; font-size: 0.88rem; font-weight: 500;
    }
#view-rm .progress-head span:last-child {
      color: var(--accent-fg); font-weight: 600; font-variant-numeric: tabular-nums;
    }
#view-rm .progress-bar {
      height: 8px; background: var(--bg-subtle);
      border-radius: 999px; overflow: hidden;
    }
#view-rm .progress-fill {
      height: 100%;
      background: var(--accent);
      border-radius: 999px;
      transition: width .6s ease;
    }
#view-rm .errors {
      margin-top: 12px; font-size: 0.8rem; color: var(--danger-fg);
      background: var(--danger-soft); padding: 8px 12px; border-radius: var(--radius-sm);
    }
#view-rm .grid-2 {
      display: grid; grid-template-columns: 300px 1fr; gap: 20px;
    }
@media (max-width: 1100px) {#view-rm .grid-2 { grid-template-columns: 1fr; }}
#view-rm .panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }
#view-rm .panel-head {
      padding: 8px 12px;
      border-bottom: 1px solid var(--border-strong);
      font-weight: 650; font-size: 0.82rem;
      display: flex; justify-content: space-between; align-items: center;
      background: var(--table-head);
      color: var(--table-head-text);
    }
#view-rm .panel > .panel-head:first-child {
      border-top-left-radius: inherit;
      border-top-right-radius: inherit;
    }
#view-rm .panel > .legend:last-child {
      border-bottom-left-radius: inherit;
      border-bottom-right-radius: inherit;
    }
#view-rm .panel-head .meta {
      font-weight: 400; color: var(--muted); font-size: 0.72rem;
    }
#view-rm .hotel-list { max-height: 520px; overflow-y: auto; color-scheme: inherit; }
#view-rm .hotel-item {
      padding: 14px 18px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background .15s;
    }
#view-rm .hotel-item:hover { background: var(--surface-hover); }
#view-rm .hotel-item.active {
      background: var(--accent-soft);
      border-left: 3px solid var(--accent);
      padding-left: 15px;
    }
#view-rm .hotel-item .name { font-size: 0.88rem; font-weight: 500; color: var(--text); }
#view-rm .hotel-item .meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }
#view-rm .mini-bar {
      height: 4px; background: var(--bg-subtle);
      border-radius: 2px; margin-top: 10px; overflow: hidden;
    }
#view-rm .mini-bar span {
      display: block; height: 100%;
      background: var(--accent);
      border-radius: 2px;
      transition: width .4s ease;
    }
#view-rm .matrix-scroll {
      overflow: auto; max-height: 520px;
      background: var(--surface);
      color-scheme: inherit;
    }
#view-rm .matrix-scroll::-webkit-scrollbar {
      width: 10px;
      height: 10px;
      background-color: #262626;
    }
html[data-theme="light"] #view-rm .matrix-scroll::-webkit-scrollbar {
      background-color: #ffffff;
    }
#view-rm .matrix-scroll::-webkit-scrollbar-track,
#view-rm .matrix-scroll::-webkit-scrollbar-track-piece,
#view-rm .matrix-scroll::-webkit-scrollbar-corner {
      background-color: #262626;
    }
html[data-theme="light"] #view-rm .matrix-scroll::-webkit-scrollbar-track,
html[data-theme="light"] #view-rm .matrix-scroll::-webkit-scrollbar-track-piece,
html[data-theme="light"] #view-rm .matrix-scroll::-webkit-scrollbar-corner {
      background-color: #ffffff;
    }
#view-rm .matrix-scroll::-webkit-scrollbar-thumb {
      background-color: #525252;
      border-radius: 8px;
      border: 2px solid #262626;
    }
html[data-theme="light"] #view-rm .matrix-scroll::-webkit-scrollbar-thumb {
      background-color: #a3a3a3;
      border-color: #ffffff;
    }
#view-rm table.matrix {
      border-collapse: collapse;
      font-size: 0.72rem;
      min-width: 100%;
      background: var(--surface);
      color: var(--text);
    }
#view-rm table.matrix th,
#view-rm table.matrix td {
      border: 1px solid var(--border);
      padding: 7px 9px;
      text-align: center;
      white-space: nowrap;
    }
#view-rm table.matrix th {
      background: var(--table-head);
      position: sticky; top: 0; z-index: 2;
      font-weight: 700; color: var(--table-head-text);
      font-size: 0.7rem;
      box-shadow: inset 0 -1px 0 var(--border-strong);
    }
#view-rm .matrix-date-head {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      line-height: 1.15;
    }
#view-rm .matrix-date-head.sat { color: var(--accent-fg); }
#view-rm .matrix-date-head.sun { color: var(--danger-fg); }
#view-rm .matrix-day-label {
      font-size: 0.62rem;
      font-weight: 800;
    }
#view-rm .matrix-today-badge {
      padding: 2px 6px;
      border-radius: 999px;
      background: var(--accent);
      color: var(--on-accent);
      font-size: 0.58rem;
      font-weight: 800;
      box-shadow: 0 2px 7px rgba(0, 111, 255, 0.25);
    }
#view-rm .matrix-holiday-badge {
      padding: 2px 5px;
      border-radius: 999px;
      font-size: 0.54rem;
      font-weight: 800;
      white-space: nowrap;
      line-height: 1.2;
    }
#view-rm .matrix-holiday-badge.kr {
      background: var(--danger-chip);
      color: var(--danger-on);
      border: 1px solid transparent;
    }
#view-rm .matrix-holiday-badge.jp {
      background: var(--info-chip);
      color: var(--info-on);
      border: 1px solid transparent;
    }
#view-rm .matrix-holiday-badge.cn {
      background: var(--warn-chip);
      color: var(--warn-on);
      border: 1px solid transparent;
    }
#view-rm .matrix-holiday-picks {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-size: 0.74rem;
      color: var(--text-secondary);
    }
#view-rm .matrix-holiday-picks label {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
    }
#view-rm table.matrix th.sticky-col,
#view-rm table.matrix td.sticky-col {
      position: sticky; left: 0; z-index: 1;
      background: var(--surface);
      text-align: left; min-width: 130px; max-width: 170px;
      overflow: hidden; text-overflow: ellipsis;
      font-weight: 500;
    }
#view-rm table.matrix th.sticky-col { z-index: 3; background: var(--table-head); }
#view-rm table.matrix tbody tr:hover td { background: var(--row-hover); }
#view-rm table.matrix tbody tr:hover td.sticky-col { background: var(--row-hover); }
#view-rm .cell-price {
      cursor: pointer; border-radius: 4px;
      min-width: 58px; font-variant-numeric: tabular-nums;
      font-weight: 500;
      transition: transform .1s, box-shadow .1s;
      position: relative;
    }
#view-rm .cell-price:hover {
      box-shadow: inset 0 0 0 2px var(--accent);
      z-index: 1;
    }
#view-rm .cell-price.selected {
      z-index: 2;
      font-weight: 700;
      box-shadow: inset 0 0 0 3px var(--accent);
    }
#view-rm .cell-price.selected::after {
      content: '';
      position: absolute;
      top: 3px; right: 3px;
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 0 1.5px var(--surface);
    }
#view-rm table.matrix tr.row-selected td.sticky-col {
      background: rgba(0, 111, 255, 0.08);
      font-weight: 600;
      color: var(--accent-fg);
    }
#view-rm table.matrix tr.row-ours td.sticky-col {
      font-weight: 600;
    }
#view-rm .cell-empty { color: var(--muted); background: var(--bg) !important; }
#view-rm .rm-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 11000;
  pointer-events: none;
}
#view-rm .rm-detail-drawer[hidden] { display: none !important; }
#view-rm .rm-detail-panel {
  pointer-events: auto;
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(460px, 100vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
#view-rm .rm-detail-drawer.is-open .rm-detail-panel {
  transform: translateX(0);
}
@media (max-width: 768px) {
  #view-rm .rm-detail-panel {
    top: auto;
    left: 0;
    width: 100%;
    height: min(74vh, 720px);
    border-left: 0;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.16);
  }
  #view-rm .rm-detail-drawer.is-open .rm-detail-panel {
    transform: translateY(0);
  }
  #view-rm .rm-detail-chart { height: 180px; }
}
#view-rm .rm-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#view-rm .rm-detail-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
#view-rm .rm-detail-sub {
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}
#view-rm .rm-detail-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#view-rm .rm-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  color-scheme: inherit;
}
#view-rm .rm-detail-chart {
  height: 220px;
  border-bottom: 1px solid var(--border);
}
#view-rm .room-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
#view-rm .room-table th,
#view-rm .room-table td {
      padding: 11px 18px;
      border-bottom: 1px solid var(--border);
      text-align: left;
    }
#view-rm .rm-detail-panel .room-table {
  table-layout: fixed;
  font-size: 0.78rem;
}
#view-rm .rm-detail-panel .room-table th,
#view-rm .rm-detail-panel .room-table td {
  padding: 8px 10px;
  vertical-align: top;
  word-break: keep-all;
  line-height: 1.35;
}
#view-rm .rm-detail-panel .room-table th:nth-child(1),
#view-rm .rm-detail-panel .room-table td:nth-child(1) { width: 32%; }
#view-rm .rm-detail-panel .room-table th:nth-child(2),
#view-rm .rm-detail-panel .room-table td:nth-child(2) { width: 30%; }
#view-rm .rm-detail-panel .room-table th:nth-child(3),
#view-rm .rm-detail-panel .room-table td:nth-child(3) {
  width: 18%;
  white-space: nowrap;
}
#view-rm .rm-detail-panel .room-table th:nth-child(4),
#view-rm .rm-detail-panel .room-table td:nth-child(4) {
  width: 20%;
  white-space: nowrap;
}
#view-rm .rm-detail-panel .room-table td:nth-child(3) strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#view-rm .room-table th {
      color: var(--table-head-text); font-weight: 700;
      font-size: 0.72rem; text-transform: uppercase;
      letter-spacing: .04em;
      background: var(--table-head);
    }
#view-rm .room-table tbody tr:hover { background: var(--row-hover); }
#view-rm .room-table td strong { color: var(--accent-fg); font-variant-numeric: tabular-nums; }
#view-rm .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 2px;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 0.68rem;
      font-weight: 600;
      line-height: 1.2;
      white-space: nowrap;
    }
#view-rm .badge-ok { background: var(--success-soft); color: var(--success-fg); }
#view-rm .badge-ok .badge-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success-fg) 14%, transparent);
  font-variant-numeric: tabular-nums;
}
#view-rm .badge-full { background: var(--danger-soft); color: var(--danger-fg); }
#view-rm .room-card-sub {
  word-break: keep-all;
}
#view-rm .chart-box { padding: 12px 14px; height: 240px; background: var(--surface); }
#view-rm .placeholder {
      padding: 8px 12px; text-align: left;
      color: var(--muted); font-size: 0.8rem;
    }
#view-rm .products-scroll:has(> .placeholder) {
      max-height: none;
    }
#view-rm .matrix-scroll:has(> .placeholder) {
      max-height: none;
    }
#view-rm .panel:has(#matrixWrap > .placeholder) .legend,
#view-rm .panel:has(#matrixWrap > .placeholder) .scroll-hint {
      display: none;
    }
#view-rm .legend {
      display: flex; gap: 14px; flex-wrap: wrap;
      padding: 8px 14px;
      font-size: 0.72rem; color: var(--text-secondary);
      border-top: 1px solid var(--border);
      background: var(--bg-subtle);
    }
#view-rm .legend span { display: flex; align-items: center; gap: 6px; }
#view-rm .swatch { width: 16px; height: 12px; border-radius: 8px; border: 1px solid var(--border); }
#view-rm .matrix-head {
      flex-wrap: wrap;
      gap: 10px;
    }
#view-rm .matrix-head-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-left: auto;
    }
#view-rm .matrix-toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      user-select: none;
      font-size: 0.74rem;
      color: var(--text-secondary);
      white-space: nowrap;
    }
#view-rm .matrix-toggle input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
    }
#view-rm .matrix-toggle-ui {
      width: 38px;
      height: 22px;
      border-radius: 999px;
      background: var(--neutral-600);
      position: relative;
      transition: background .18s;
      flex-shrink: 0;
    }
#view-rm .matrix-toggle-ui::after {
      content: '';
      position: absolute;
      top: 3px; left: 3px;
      width: 16px; height: 16px;
      border-radius: 50%;
      background: var(--knob);
      box-shadow: 0 1px 3px rgba(15,23,42,.18);
      transition: transform .18s;
    }
#view-rm .matrix-toggle input:checked + .matrix-toggle-ui {
      background: var(--accent);
    }
#view-rm .matrix-toggle input:checked + .matrix-toggle-ui::after {
      transform: translateX(16px);
    }
#view-rm .cell-price.cell-baseline {
      background: var(--neutral-600) !important;
      color: var(--text) !important;
      font-weight: 700;
    }
#view-rm .cell-price.cell-rel-cheaper { color: var(--success-fg); }
#view-rm .cell-price.cell-rel-higher { color: var(--danger-fg); }
#view-rm .chat-widget {
      position: fixed; right: 24px; bottom: 24px; z-index: 9999;
      font-family: var(--font);
    }
#view-rm .chat-fab {
      width: 58px; height: 58px; border-radius: 50%;
      background: var(--accent);
      color: var(--on-accent); border: none; cursor: pointer;
      box-shadow: 0 4px 20px rgba(0, 111, 255, 0.45);
      display: flex; align-items: center; justify-content: center;
      position: relative;
      transition: transform .2s, box-shadow .2s;
    }
#view-rm .chat-fab:hover { transform: scale(1.06); box-shadow: 0 6px 28px rgba(0, 111, 255, 0.5); }
#view-rm .chat-fab svg { width: 26px; height: 26px; fill: currentColor; }
#view-rm .chat-fab .icon-close { display: none; }
#view-rm .chat-fab .robot-icon {
      width: 34px;
      height: 34px;
      filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.18));
      animation: robot-float 2.8s ease-in-out infinite;
    }
#view-rm .chat-fab:hover .robot-icon { animation-duration: 1.6s; }
#view-rm .chat-fab .robot-badge {
      position: absolute;
      right: -8px;
      top: -7px;
      padding: 4px 7px;
      border-radius: 999px;
      background: var(--surface);
      color: var(--accent-fg);
      border: 1px solid rgba(0, 111, 255, 0.18);
      box-shadow: 0 5px 14px rgba(15, 23, 42, 0.16);
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      white-space: nowrap;
    }
#view-rm .chat-widget.open .chat-fab .icon-chat { display: none; }
#view-rm .chat-widget.open .chat-fab .robot-badge { display: none; }
#view-rm .chat-widget.open .chat-fab .icon-close { display: block; }
#view-rm .robot-eye { transform-origin: center; animation: robot-blink 4.2s ease-in-out infinite; }
#view-rm .robot-eye.right { animation-delay: .08s; }
#view-rm .robot-antenna-dot { animation: robot-pulse 1.9s ease-in-out infinite; }
#view-rm .robot-smile { animation: robot-smile 3.4s ease-in-out infinite; }
@keyframes robot-float {
      0%, 100% { transform: translateY(0) rotate(0deg); }
      35% { transform: translateY(-3px) rotate(-3deg); }
      70% { transform: translateY(1px) rotate(2deg); }
    }
@keyframes robot-blink {
      0%, 44%, 50%, 100% { transform: scaleY(1); }
      47% { transform: scaleY(.16); }
    }
@keyframes robot-pulse {
      0%, 100% { opacity: .72; transform: scale(1); }
      50% { opacity: 1; transform: scale(1.22); }
    }
@keyframes robot-smile {
      0%, 100% { stroke-dasharray: 18 24; stroke-dashoffset: 0; }
      50% { stroke-dasharray: 14 24; stroke-dashoffset: -2; }
    }
#view-rm .chat-window {
      position: absolute; right: 0; bottom: 72px;
      width: 380px; max-width: calc(100vw - 48px);
      height: 520px; max-height: calc(100vh - 120px);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow-lg);
      display: flex; flex-direction: column;
      overflow: hidden;
      opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.96);
      transition: opacity .22s, transform .22s, visibility .22s;
      transform-origin: bottom right;
    }
#view-rm .chat-widget.open .chat-window {
      opacity: 1; visibility: visible; transform: translateY(0) scale(1);
    }
#view-rm .chat-header {
      padding: 14px 16px;
      background: var(--accent);
      color: var(--on-accent);
      display: flex; align-items: center; justify-content: space-between;
      flex-shrink: 0;
    }
#view-rm .chat-header-info { display: flex; align-items: center; gap: 10px; }
#view-rm .chat-avatar {
      width: 40px; height: 40px; border-radius: 8px;
      background: color-mix(in srgb, var(--on-accent) 18%, transparent);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; font-weight: 700;
      box-shadow: none;
    }
#view-rm .chat-avatar .robot-icon {
      width: 31px;
      height: 31px;
      animation: robot-float 3.2s ease-in-out infinite;
    }
#view-rm .chat-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#view-rm .chat-header-title { font-size: 0.9rem; font-weight: 600; }
#view-rm .chat-header-sub { font-size: 0.72rem; opacity: .85; margin-top: 1px; }
#view-rm .rm-helper-badge {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(255,255,255,.24);
      border: 1px solid rgba(255,255,255,.28);
      color: var(--on-accent);
      font-size: 0.65rem;
      font-weight: 800;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
    }
#view-rm .chat-header .agent-badge {
      background: rgba(255,255,255,.2); color: var(--on-accent);
      font-size: 0.62rem;
    }
#view-rm .chat-header .agent-badge.off { background: rgba(255,100,100,.3); }
#view-rm .chat-close-btn {
      display: none;
      width: 36px; height: 36px;
      border-radius: 50%;
      border: none;
      background: rgba(255,255,255,.22);
      color: var(--on-accent);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
    }
#view-rm .chat-close-btn:hover { background: rgba(255,255,255,.32); }
#view-rm .chat-suggestions-bar {
      padding: 10px 12px; display: flex; gap: 6px;
      overflow-x: auto; flex-shrink: 0;
      border-bottom: 1px solid var(--border);
      background: var(--bg-subtle);
    }
#view-rm .chat-suggestions-bar::-webkit-scrollbar { height: 0; }
#view-rm .chat-messages {
      flex: 1; padding: 16px; overflow-y: auto;
      display: flex; flex-direction: column; gap: 8px;
      align-items: stretch;
      background: var(--bg);
      color-scheme: inherit;
    }
#view-rm .chat-msg {
      width: fit-content;
      max-width: 72%;
      padding: 8px 12px;
      border-radius: 14px;
      font-size: 0.82rem; line-height: 1.5;
      white-space: pre-wrap;
      text-align: left;
      box-sizing: border-box;
    }
#view-rm .chat-msg.user {
      align-self: flex-end;
      background: var(--accent);
      color: var(--on-accent);
      border-bottom-right-radius: 4px;
    }
#view-rm .chat-msg.assistant {
      align-self: flex-start;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      border-bottom-left-radius: 4px;
      box-shadow: var(--shadow-sm);
    }
#view-rm .chat-msg.error {
      background: var(--danger-soft);
      color: var(--danger-fg);
      border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
    }
#view-rm .chat-msg.loading {
      align-self: center;
      margin-left: auto;
      margin-right: auto;
      width: min(240px, 88%);
      max-width: 88%;
      color: var(--text-secondary);
      font-style: normal;
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-sm);
      padding: 16px 14px;
      animation: chat-loading-pulse 2.2s ease-in-out infinite;
    }
#view-rm .chat-loading-inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      text-align: center;
    }
#view-rm .chat-loading-spinner {
      width: 22px;
      height: 22px;
      margin: 0;
      border: 2.5px solid var(--accent-soft);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: chat-spin 0.75s linear infinite;
      flex-shrink: 0;
    }
#view-rm .chat-loading-text {
      width: 100%;
      min-width: 0;
      text-align: center;
    }
#view-rm .chat-loading-label {
      font-size: 0.82rem;
      font-weight: 500;
      color: var(--text);
      text-align: center;
    }
#view-rm .chat-loading-hint {
      font-size: 0.72rem;
      color: var(--muted);
      margin-top: 2px;
      text-align: center;
      min-height: 1.35em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: opacity .25s;
    }
#view-rm .chat-loading-dots {
      display: inline-flex;
      gap: 1px;
      margin-left: 1px;
    }
#view-rm .chat-loading-dots span {
      animation: chat-dot 1.2s ease-in-out infinite;
      opacity: 0.25;
    }
#view-rm .chat-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
#view-rm .chat-loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-spin { to { transform: rotate(360deg); } }
@keyframes chat-dot {
      0%, 70%, 100% { opacity: 0.2; transform: translateY(0); }
      35% { opacity: 1; transform: translateY(-2px); }
    }
@keyframes chat-loading-pulse {
      0%, 100% { border-color: var(--border); box-shadow: var(--shadow-sm); }
      50% { border-color: rgba(0, 111, 255, 0.35); box-shadow: 0 0 0 3px var(--accent-soft); }
    }
#view-rm .chat-send.is-loading { pointer-events: none; }
#view-rm .chat-send.is-loading svg { opacity: 0; }
#view-rm .chat-send.is-loading::after {
      content: '';
      position: absolute;
      width: 18px;
      height: 18px;
      border: 2px solid rgba(255, 255, 255, 0.35);
      border-top-color: var(--on-accent);
      border-radius: 50%;
      animation: chat-spin 0.7s linear infinite;
    }
#view-rm .chat-send { position: relative; }
#view-rm .chat-widget.busy .chat-header {
      background-size: 200% 200%;
      animation: chat-header-shimmer 3s ease infinite;
    }
@keyframes chat-header-shimmer {
      0%, 100% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
    }
#view-rm .suggest-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      pointer-events: none;
    }
#view-rm .chat-input:disabled {
      opacity: 0.65;
      cursor: wait;
    }
#view-rm .rm-alert-widget {
      position: relative;
      font-family: var(--font);
    }
#view-rm .rm-alert-btn {
      position: relative;
      width: 38px;
      height: 38px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
      -webkit-tap-highlight-color: transparent;
    }
#view-rm .rm-alert-btn.has-alert {
      background: var(--accent);
      color: var(--on-accent);
      border-color: transparent;
      box-shadow: 0 4px 14px rgba(0, 111, 255, 0.38);
    }
#view-rm .rm-alert-btn.has-alert svg { fill: var(--on-accent); }
#view-rm .rm-alert-btn:hover {
      background: var(--bg-subtle);
      color: var(--accent-fg);
      border-color: rgba(0, 111, 255, 0.22);
    }
#view-rm .rm-alert-btn.has-alert:hover {
      background: var(--accent);
      color: var(--on-accent);
      box-shadow: 0 6px 18px rgba(0, 111, 255, 0.45);
    }
#view-rm .rm-alert-widget.open .rm-alert-btn {
      background: var(--accent-soft);
      color: var(--accent-fg);
      border-color: rgba(0, 111, 255, 0.28);
      box-shadow: none;
    }
#view-rm .rm-alert-widget.open .rm-alert-btn.has-alert {
      background: var(--accent);
      color: var(--on-accent);
      border-color: transparent;
      box-shadow: 0 4px 14px rgba(0, 111, 255, 0.38);
    }
#view-rm .rm-alert-widget.open .rm-alert-btn.has-alert svg { fill: var(--on-accent); }
#view-rm .rm-alert-btn svg { width: 20px; height: 20px; fill: currentColor; }
#view-rm .rm-alert-badge {
      position: absolute;
      right: -6px;
      top: -6px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 999px;
      background: var(--danger);
      color: var(--on-accent);
      border: 2px solid var(--surface);
      font-size: 0.6rem;
      font-weight: 800;
      line-height: 14px;
      display: none;
      align-items: center;
      justify-content: center;
      pointer-events: none;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    }
#view-rm .rm-alert-badge.show { display: flex; }
#view-rm .rm-alert-panel {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      width: 360px;
      max-width: calc(100vw - 24px);
      max-height: 420px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-6px) scale(.98);
      transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
      z-index: 200;
    }
#view-rm .rm-alert-widget.open .rm-alert-panel {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
    }
#view-rm .rm-alert-head {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
      background: var(--surface-hover);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
#view-rm .rm-alert-head strong { font-size: .88rem; color: var(--text); }
#view-rm .rm-alert-head span { font-size: .72rem; color: var(--muted); }
#view-rm .rm-alert-list { max-height: 350px; overflow-y: auto; background: var(--surface); color-scheme: inherit; }
#view-rm .rm-alert-empty {
      padding: 32px 18px;
      text-align: center;
      color: var(--muted);
      font-size: .84rem;
    }
#view-rm .rm-alert-item {
      padding: 13px 16px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
    }
#view-rm .rm-alert-item:last-child { border-bottom: none; }
#view-rm .rm-alert-title {
      font-size: .84rem;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 5px;
    }
#view-rm .rm-alert-body {
      font-size: .78rem;
      line-height: 1.6;
      color: var(--text-secondary);
    }
#view-rm .rm-alert-body p,
#view-rm .rm-toast-body p {
      margin: 0 0 8px;
    }
#view-rm .rm-alert-body p:last-child,
#view-rm .rm-toast-body p:last-child {
      margin-bottom: 0;
    }
#view-rm .rm-toast-stack {
      position: fixed;
      right: 24px;
      top: calc(16px + env(safe-area-inset-top));
      z-index: 10001;
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 360px;
      max-width: calc(100vw - 32px);
      pointer-events: none;
    }
#view-rm .rm-toast {
      pointer-events: auto;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      box-shadow: var(--shadow-lg);
      padding: 13px 14px;
      display: grid;
      grid-template-columns: 34px 1fr;
      gap: 11px;
      animation: rm-toast-in .24s ease-out;
    }
#view-rm .rm-toast-icon {
      width: 34px;
      height: 34px;
      border-radius: 12px;
      background: var(--accent-soft);
      color: var(--accent-fg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
    }
#view-rm .rm-toast-title {
      font-size: .84rem;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 4px;
    }
#view-rm .rm-toast-body {
      font-size: .76rem;
      line-height: 1.55;
      color: var(--text-secondary);
    }
@keyframes rm-toast-in {
      from { opacity: 0; transform: translateY(-8px) scale(.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
#view-rm .suggest-btn {
      flex-shrink: 0;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 0.72rem;
      cursor: pointer;
      font-family: var(--font);
      transition: all .15s;
      white-space: nowrap;
    }
#view-rm .suggest-btn:hover {
      border-color: var(--accent);
      color: var(--accent-fg);
      background: var(--accent-soft);
    }
#view-rm .chat-input-row {
      display: flex; gap: 8px;
      padding: 12px 14px;
      border-top: 1px solid var(--border);
      background: var(--surface);
      flex-shrink: 0;
    }
#view-rm .chat-input {
      flex: 1;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 10px 14px;
      border-radius: 999px;
      font-size: 0.85rem;
      font-family: var(--font);
    }
#view-rm .chat-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
      background: var(--surface);
    }
#view-rm .chat-send {
      width: 40px; height: 40px; border-radius: 50%;
      background: var(--accent);
      color: var(--on-accent); border: none;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      transition: background .15s;
    }
#view-rm .chat-send:hover { background: var(--accent-hover); }
#view-rm .chat-send:disabled { opacity: .45; cursor: not-allowed; }
#view-rm .chat-send svg { width: 18px; height: 18px; fill: currentColor; }
#view-rm .agent-badge {
      font-size: 0.68rem; font-weight: 600;
      padding: 3px 8px; border-radius: 999px;
      background: var(--success-soft); color: var(--success-fg);
    }
#view-rm .agent-badge.off { background: var(--danger-soft); color: var(--danger-fg); }
@media (max-width: 480px) {#view-rm .chat-widget { right: 16px; bottom: 16px; }
#view-rm .chat-window { width: calc(100vw - 32px); height: calc(100vh - 100px); }
#view-rm .chat-msg { max-width: 80%; }
#view-rm .chat-msg.loading {
        align-self: center;
        width: min(260px, 90%);
        max-width: 90%;
      }}
#view-rm .section-label {
      font-size: 0.72rem; font-weight: 600;
      color: var(--muted); text-transform: uppercase;
      letter-spacing: .08em;
      margin: 12px 0 8px;
    }
#view-rm .date-toolbar {
      display: flex; align-items: center; gap: 12px;
      padding: 6px 12px; border-bottom: 1px solid var(--border);
      background: var(--surface);
    }
#view-rm .date-toolbar input[type=date] {
      border: 1px solid var(--border); border-radius: var(--radius-sm);
      padding: 8px 12px; font-family: var(--font); font-size: 0.85rem;
      color: var(--text); background: var(--inset);
      color-scheme: inherit;
    }
#view-rm .date-toolbar .hint { font-size: 0.78rem; color: var(--muted); }
#view-rm .products-scroll { max-height: 480px; overflow: auto; background: var(--surface); color-scheme: inherit; }
#view-rm .products-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.82rem; }
#view-rm .products-table th,
#view-rm .products-table td {
      padding: 10px 10px; border-bottom: 1px solid var(--border); text-align: left;
      vertical-align: middle;
    }
#view-rm .products-table th:nth-child(1),
#view-rm .products-table td:nth-child(1) { width: 40px; }
#view-rm .products-table th:nth-child(2),
#view-rm .products-table td:nth-child(2) { width: 22%; }
#view-rm .products-table th:nth-child(3),
#view-rm .products-table td:nth-child(3) {
      width: 108px;
      max-width: 108px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
#view-rm .products-table th:nth-child(5),
#view-rm .products-table td:nth-child(5) {
      width: 76px;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
#view-rm .products-table th:nth-child(6),
#view-rm .products-table td:nth-child(6) { width: 88px; white-space: nowrap; }
#view-rm .products-table .price { font-weight: 600; color: var(--accent-fg); white-space: nowrap; }
#view-rm .products-table th {
      position: sticky; top: 0; background: var(--table-head);
      font-size: 0.7rem; text-transform: uppercase; letter-spacing: .04em;
      color: var(--table-head-text); font-weight: 700; z-index: 1;
      box-shadow: inset 0 -1px 0 var(--border-strong);
    }
#view-rm .products-table tbody tr:hover { background: var(--row-hover); }
#view-rm .products-table .sold { color: var(--muted); }
#view-rm .tabs-bar {
      display: flex; gap: 4px;
      margin-bottom: 12px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 4px;
      width: fit-content;
      box-shadow: var(--shadow-sm);
    }
#view-rm .rm-subtab {
      padding: 10px 20px;
      border: none; border-radius: var(--radius-sm);
      background: transparent;
      font-family: var(--font);
      font-size: 0.88rem; font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      transition: background .15s, color .15s;
    }
#view-rm .rm-subtab:hover { color: var(--text); background: var(--bg-subtle); }
#view-rm .rm-subtab.active {
      background: var(--accent);
      color: var(--on-accent);
      box-shadow: 0 1px 3px rgba(0, 111, 255, 0.3);
    }
#view-rm .tab-panel { display: none; }
#view-rm .tab-panel.active { display: block; }
#view-rm .overview-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 12px;
      align-items: stretch;
    }
#view-rm .overview-grid > .panel {
      display: flex;
      flex-direction: column;
      min-height: 280px;
    }
#view-rm #rankWrap {
      flex: 1;
      min-height: 220px;
      max-height: 320px;
      overflow: auto;
      background: var(--surface);
      color-scheme: inherit;
    }
#view-rm #rankWrap > .placeholder,
#view-rm .daily-chart-box > .placeholder {
      display: flex;
      align-items: center;
      min-height: 220px;
      padding: 16px 14px;
      margin: 0;
    }
@media (max-width: 900px) {#view-rm .overview-grid { grid-template-columns: 1fr; }}
#view-rm .our-hotel-section { margin-bottom: 18px; }
#view-rm .our-hotel-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
    }
#view-rm .our-hotel-head .section-label { margin-bottom: 0; }
#view-rm .our-hotel-meta { font-size: 0.72rem; color: var(--muted); }
#view-rm .our-hotel-cards .card.our-accent {
      border-color: rgba(0, 111, 255, 0.28);
      background: linear-gradient(180deg, rgba(0,111,255,.06), var(--surface));
    }
#view-rm .our-hotel-insight {
      margin-top: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      background: var(--accent-soft);
      border: 1px solid rgba(0,111,255,.14);
      font-size: 0.82rem;
      line-height: 1.5;
      color: var(--text);
    }
#view-rm .our-hotel-room-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
#view-rm .our-hotel-room-table th,
#view-rm .our-hotel-room-table td {
      padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left;
    }
#view-rm .our-hotel-room-table td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
#view-rm .rank-table tr.our-hotel-row { background: rgba(0,111,255,.08); }
#view-rm .rank-table tr.our-hotel-row td { font-weight: 600; }
#view-rm .our-tag {
      display: inline-flex; align-items: center;
      padding: 2px 7px; border-radius: 999px;
      background: var(--accent-soft); color: var(--accent-fg);
      font-size: 0.62rem; font-weight: 700; margin-left: 6px;
    }
#view-rm .alert-banner {
      background: var(--warn-soft);
      border: 1px solid var(--warn);
      color: var(--warn-fg);
      padding: 12px 18px;
      border-radius: var(--radius);
      font-size: 0.85rem;
      margin-bottom: 20px;
    }
#view-rm .rank-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
#view-rm .rank-table th,
#view-rm .rank-table td {
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
      text-align: left;
    }
#view-rm .rank-table th {
      font-size: 0.7rem; text-transform: uppercase;
      letter-spacing: .04em; color: var(--table-head-text);
      background: var(--table-head); font-weight: 700;
    }
#view-rm .rank-table tbody tr:hover { background: var(--row-hover); }
#view-rm .rank-table .rank-num {
      color: var(--muted); font-weight: 600; width: 36px;
      font-variant-numeric: tabular-nums;
    }
#view-rm .rank-table .rank-price {
      font-weight: 600; color: var(--accent-fg);
      font-variant-numeric: tabular-nums;
    }
#view-rm .rank-table tr:first-child td { background: var(--accent-soft); }
#view-rm .rank-table tr:first-child .rank-price { color: var(--accent-hover); }
#view-rm .daily-chart-box {
      position: relative;
      flex: 1;
      padding: 10px 12px;
      min-height: 220px;
      height: 220px;
    }
#view-rm .daily-chart-box.is-empty {
      display: flex;
      align-items: stretch;
      padding: 0;
      height: auto;
      min-height: 220px;
    }
#view-rm .daily-chart-box.is-empty canvas {
      display: none;
    }
#view-rm .daily-chart-box:not(.is-empty) > .placeholder {
      display: none;
    }
#view-rm .daily-chart-box canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
    }
#view-rm .collection-hotels .hotel-list { max-height: none; }
#view-rm .history-toolbar {
      display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
      padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface);
    }
#view-rm .history-toolbar label { display: flex; flex-direction: column; gap: 6px; font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
#view-rm .history-toolbar select,
#view-rm .history-toolbar input[type=date] {
      min-width: 160px; padding: 8px 10px; border: 1px solid var(--border);
      border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem;
      background: var(--inset); color: var(--text); color-scheme: inherit;
    }
#view-rm .history-toolbar .btn-compare {
      padding: 9px 16px; border: none; border-radius: var(--radius-sm);
      background: var(--accent); color: var(--on-accent); font-family: var(--font); font-weight: 600;
      font-size: 0.85rem; cursor: pointer;
    }
#view-rm .history-toolbar .btn-compare:disabled { opacity: 0.5; cursor: not-allowed; }
#view-rm .history-summary {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px;
    }
@media (max-width: 640px) {#view-rm .history-summary { grid-template-columns: 1fr; }}
#view-rm .history-summary .card { margin-bottom: 0; }
#view-rm .change-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
#view-rm .change-table th,
#view-rm .change-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
#view-rm .change-table th { position: sticky; top: 0; background: var(--table-head); font-size: 0.7rem; text-transform: uppercase; color: var(--table-head-text); font-weight: 700; z-index: 1; box-shadow: inset 0 -1px 0 var(--border-strong); }
#view-rm .change-table tbody tr:hover { background: var(--row-hover); }
#view-rm .delta-up { color: var(--danger-fg); font-weight: 700; font-variant-numeric: tabular-nums; }
#view-rm .delta-down { color: var(--success-fg); font-weight: 700; font-variant-numeric: tabular-nums; }
#view-rm .delta-flat { color: var(--muted); }
#view-rm .history-scroll { max-height: 520px; overflow: auto; background: var(--surface); color-scheme: inherit; }
#view-rm .history-cards { display: none; }
@media (max-width: 768px) {#view-rm .history-table-wrap { display: none; }
#view-rm .history-cards { display: block; }
#view-rm .history-toolbar select,
#view-rm .history-toolbar input[type=date] { min-width: 0; width: 100%; }
#view-rm .history-toolbar label { flex: 1; min-width: 140px; }}
#view-rm .change-card {
      padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface);
    }
#view-rm .change-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
#view-rm .change-card-hotel { font-weight: 600; font-size: 0.9rem; }
#view-rm .change-card-date { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
#view-rm .change-card-prices { font-size: 0.82rem; color: var(--text-secondary); margin-top: 8px; }
#view-rm .change-card-sub { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
#view-rm .history-empty-state {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      min-height: calc(100vh - 180px);
      padding: 48px 24px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
    }
#view-rm .history-empty-state.show { display: flex; }
#view-rm .history-empty-icon {
      width: 64px;
      height: 64px;
      border-radius: 20px;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 20px;
      color: var(--muted);
    }
#view-rm .history-empty-icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.6; }
#view-rm .history-empty-state h3 {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text);
      margin: 0 0 10px;
    }
#view-rm .history-empty-state p {
      font-size: 0.88rem;
      line-height: 1.55;
      color: var(--text-secondary);
      margin: 0;
      max-width: 320px;
    }
#view-rm .history-empty-sub {
      margin-top: 12px !important;
      font-size: 0.78rem !important;
      color: var(--muted) !important;
    }
#view-rm .mobile-cards { display: none; }
#view-rm .product-card,
#view-rm .room-card {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
    }
#view-rm .product-card:active,
#view-rm .room-card:active { background: var(--surface-hover); }
#view-rm .product-card-top,
#view-rm .room-card-top {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
    }
#view-rm .product-card-hotel,
#view-rm .room-card-title {
      font-weight: 600; font-size: 0.9rem; color: var(--text); flex: 1; line-height: 1.35;
    }
#view-rm .product-card-rank {
      font-size: 0.72rem; color: var(--muted); font-weight: 600; margin-right: 6px;
    }
#view-rm .product-card-price,
#view-rm .room-card-price {
      font-weight: 700; color: var(--accent-fg); font-size: 0.95rem;
      font-variant-numeric: tabular-nums; white-space: nowrap;
    }
#view-rm .product-card-price.sold,
#view-rm .room-card-price.sold { color: var(--muted); }
#view-rm .product-card-room,
#view-rm .product-card-product,
#view-rm .room-card-sub {
      font-size: 0.82rem; color: var(--text-secondary); margin-top: 6px; line-height: 1.4;
    }
#view-rm .product-card-foot,
#view-rm .room-card-foot {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px;
    }
#view-rm .product-card-cancel {
      font-size: 0.72rem; color: var(--muted); flex: 1; min-width: 0;
    }
#view-rm .product-hotel-card {
      border-bottom: 1px solid var(--border);
      background: var(--surface);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
#view-rm .product-hotel-card:active { background: var(--surface-hover); }
#view-rm .product-hotel-card-inner {
      padding: 15px 16px;
    }
#view-rm .product-hotel-top {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    }
#view-rm .product-hotel-name {
      font-weight: 700; font-size: 0.92rem; color: var(--text);
      line-height: 1.35; word-break: keep-all;
    }
#view-rm .product-hotel-price {
      font-weight: 800; color: var(--accent-fg); font-variant-numeric: tabular-nums;
      white-space: nowrap; font-size: 0.98rem;
      display: flex; align-items: center; gap: 6px;
    }
#view-rm .product-hotel-meta {
      display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px;
      font-size: 0.74rem; color: var(--muted);
    }
#view-rm .product-hotel-meta span {
      padding: 4px 8px; border-radius: 999px; background: var(--bg-subtle);
    }
#view-rm .product-hotel-chevron {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 8px;
      background: var(--bg-subtle);
      color: var(--text-secondary);
      font-size: 1.1rem;
      font-weight: 700;
      line-height: 1;
      flex-shrink: 0;
    }
#view-rm .product-more-wrap { padding: 14px 16px 4px; }
#view-rm .product-more-btn {
      width: 100%; min-height: 46px; border: 1px solid var(--border);
      border-radius: 999px; background: var(--surface); color: var(--accent-fg);
      font-family: var(--font); font-size: 0.86rem; font-weight: 700;
      box-shadow: var(--shadow-sm); cursor: pointer;
    }
#view-rm .product-sheet-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 12000;
      background: var(--surface);
      flex-direction: column;
    }
#view-rm .product-sheet-overlay.open { display: flex; }
#view-rm .product-sheet-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: max(14px, env(safe-area-inset-top)) 16px 14px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
      flex-shrink: 0;
    }
#view-rm .product-sheet-title {
      font-size: 1.05rem;
      font-weight: 700;
      line-height: 1.35;
      color: var(--text);
    }
#view-rm .product-sheet-sub {
      font-size: 0.78rem;
      color: var(--muted);
      margin-top: 6px;
    }
#view-rm .product-sheet-close {
      width: 40px;
      height: 40px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--bg-subtle);
      color: var(--text);
      font-size: 1.5rem;
      line-height: 1;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
    }
#view-rm .product-sheet-body {
      flex: 1;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      padding: 12px 0 max(16px, env(safe-area-inset-bottom));
      background: var(--bg-subtle);
      color-scheme: inherit;
    }
#view-rm .product-sheet-body .product-card {
      margin: 0 12px 10px;
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: var(--shadow-sm);
    }
#view-rm .scroll-hint {
      display: none;
      padding: 8px 14px;
      font-size: 0.72rem;
      color: var(--muted);
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      text-align: center;
    }
@media (max-width: 768px) {#view-rm { overflow-x: hidden; }
#view-rm .topbar {
        padding: max(8px, env(safe-area-inset-top)) 12px 10px;
        height: auto; min-height: 48px;
        gap: 8px;
      }
#view-rm .brand { gap: 10px; min-width: 0; flex: 1; }
#view-rm .brand-icon { width: 34px; height: 34px; font-size: 0.72rem; flex-shrink: 0; }
#view-rm .brand h1 {
        font-size: 1.28rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      }
#view-rm .brand .subtitle { display: none; }
#view-rm .topbar-actions { gap: 8px; flex-shrink: 0; }
#view-rm .live {
        font-size: 0.68rem; padding: 5px 10px; flex-shrink: 0;
        max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      }
#view-rm .rm-alert-btn { width: 36px; height: 36px; border-radius: 9px; }
#view-rm .rm-alert-panel {
        right: -8px;
        width: min(360px, calc(100vw - 24px));
        max-height: min(420px, 58vh);
      }
#view-rm .wrap {
        padding: 12px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
      }
#view-rm .tabs-bar { display: none; }
#view-rm #tab-history,
#view-rm #tab-collection { display: none !important; }
#view-rm .cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 14px;
      }
#view-rm .cards .card.card-span-full { grid-column: 1 / -1; }
#view-rm .card { padding: 14px 16px; }
#view-rm .card .label { font-size: 0.68rem; }
#view-rm .card .value { font-size: 1.5rem; margin-top: 4px; }
#view-rm .card .sub { font-size: 0.74rem; line-height: 1.35; }
#view-rm .panel,
#view-rm .card,
#view-rm .progress-wrap {
        border-radius: 20px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
      }
#view-rm .panel {
        overflow: hidden;
        margin-bottom: 14px;
      }
#view-rm .overview-grid { gap: 12px; margin-bottom: 14px; }
#view-rm .daily-chart-box { height: auto; min-height: 220px; padding: 12px 10px; }
#view-rm .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 12px;
        font-size: 0.82rem;
      }
#view-rm .panel-head .meta { font-size: 0.72rem; }
#view-rm .alert-banner {
        font-size: 0.8rem;
        padding: 10px 14px;
        margin-bottom: 14px;
        line-height: 1.45;
      }
#view-rm .rank-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#view-rm .rank-table th,
#view-rm .rank-table td { padding: 12px 10px; }
#view-rm .rank-table td:nth-child(2) {
        max-width: 140px;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      }
#view-rm .scroll-hint { display: block; }
#view-rm .matrix-scroll {
        max-height: min(55vh, 400px);
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
      }
#view-rm table.matrix { font-size: 0.68rem; }
#view-rm table.matrix th,
#view-rm table.matrix td {
        padding: 10px 7px;
        min-width: 48px;
      }
#view-rm table.matrix th.sticky-col,
#view-rm table.matrix td.sticky-col {
        min-width: 92px; max-width: 100px;
        font-size: 0.66rem;
        box-shadow: 4px 0 8px rgba(15, 23, 42, 0.06);
      }
#view-rm table.matrix th.sticky-col { box-shadow: 4px 0 8px rgba(15, 23, 42, 0.08); }
#view-rm .cell-price { min-width: 46px; font-size: 0.68rem; }
@media (hover: none) {#view-rm .cell-price:hover { box-shadow: none; }
#view-rm .cell-price.selected { box-shadow: inset 0 0 0 3px var(--accent); }
#view-rm .card:hover { box-shadow: var(--shadow-sm); border-color: var(--border); }}
#view-rm .legend {
        gap: 6px 10px;
        padding: 10px 14px;
        font-size: 0.64rem;
        justify-content: center;
      }
#view-rm .swatch { width: 14px; height: 10px; }
#view-rm .section-label { margin-bottom: 8px; font-size: 0.68rem; }
#view-rm .date-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 14px;
      }
#view-rm .date-toolbar label { font-size: 0.82rem; font-weight: 500; }
#view-rm .date-toolbar input[type=date] {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
      }
#view-rm .date-toolbar .hint { display: none; }
#view-rm .products-scroll { max-height: none; overflow: visible; }
#view-rm .products-table-wrap,
#view-rm .room-table-wrap { display: none; }
#view-rm .mobile-cards { display: block; }
#view-rm .product-card {
        padding: 13px 14px;
        border-bottom: none;
      }
#view-rm .chart-box { height: 240px; padding: 12px; }
#view-rm .progress-wrap { padding: 16px; margin-bottom: 14px; }
#view-rm .progress-head { font-size: 0.82rem; flex-wrap: wrap; gap: 4px; }
#view-rm .hotel-item { padding: 14px; min-height: 44px; }
#view-rm .hotel-item .name { font-size: 0.86rem; }
#view-rm .hotel-item .meta { font-size: 0.72rem; line-height: 1.45; word-break: keep-all; }
#view-rm .placeholder { padding: 16px 14px; font-size: 0.82rem; }
#view-rm .history-empty-state {
        min-height: calc(100vh - 240px);
        border-radius: 20px;
        padding: 40px 20px;
      }
#view-rm .rm-toast-stack {
        top: calc(10px + env(safe-area-inset-top));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
      }
#view-rm .chat-widget {
        right: max(16px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
      }
#view-rm .chat-fab {
        width: 54px; height: 54px;
        -webkit-tap-highlight-color: transparent;
      }
#view-rm .chat-widget.open .chat-window {
        position: fixed;
        inset: 0;
        right: 0; bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
        transform: none;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
      }
#view-rm .chat-widget.open .chat-fab {
        display: none;
      }
#view-rm .chat-widget.open .chat-close-btn {
        display: flex;
      }
#view-rm .chat-widget.open.input-focused .chat-fab {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
      }
#view-rm .chat-input { font-size: 16px; }
#view-rm .chat-input-row {
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
      }
#view-rm .suggest-btn { padding: 8px 14px; font-size: 0.74rem; min-height: 36px; }}
@media (max-width: 400px) {#view-rm .card .value { font-size: 1.35rem; }}
#view-rm *,
#view-rm *::before,
#view-rm *::after { box-sizing: border-box; }
#view-rm { min-height: 0; }
#view-rm .rm-native { min-height: calc(100vh - 185px); background: var(--bg); }
#view-rm .wrap { max-width: none; padding: 12px 16px 28px; }
#view-rm .tabs-bar { margin-top: 0; }
#view-rm .tab-panel,
#view-rm .rm-tab-panel { display: none; }
#view-rm .tab-panel.active,
#view-rm .rm-tab-panel.active { display: block; }
