/* ==========================================================================
   体験デモ第2弾「シフト作成」(demo-shift.html)だけで使う見た目。動きは js/demo-shift.js、中身は js/demo-shift-data.js。

   - 上から5つの手順(スタッフ → 店長 → オーナー → 店長 → みんな)を並べ、1つ終えるごとに下の手順が動き出す
   - 幅 1100px 以上: 左に説明(画面の上に付いてくる)、右に大きな画面。それより狭い: 説明の下に画面
   - 画面の中の色は、本物の ZEUS のライトモードの値(レジ本体 client/src/index.css):
       レジ(シフト作成・シフト表)… 寒色の紙(.app-shell.is-light)
       シフトアプリ・本部ポータル … 暖色の紙(共有の .is-light)
   - 画面の中のクラスは本物と名前を分けてある(ap- = シフトアプリ / rg- = レジ / hq- = 本部 / kd- = キッチン / pp- = 紙)。
     ホームページ共通の style.css とぶつからないように
   - 共通の style.css は section に上下 96px の余白を付ける。画面の中では section を使わない(第1弾で踏んだ)
   ========================================================================== */

.sd-section {
  --sd-head: 77px; /* サイト共通の上の帯(sticky)の高さ */
  --sd-bg: linear-gradient(180deg, #f6f9fc 0%, #ecf2f8 100%);
  --sd-text: #1b2430;
  --sd-muted: #586273;
  --sd-faint: #7a8798;
  --sd-line: #d2dbe6;
  --sd-panel: #ffffff;
  --sd-accent: #0b9fd1;
  --sd-accent-soft: #e5f6fd;
  --sd-accent-text: #0b3a52;
  --sd-hot: #ff8a3d;
  --sd-done: #16a36f;
  --sd-done-soft: #e6f6ee;
  --sd-device-shadow: 0 26px 50px rgba(22, 40, 66, 0.22), 0 7px 16px rgba(22, 40, 66, 0.14);
  --fr-metal: linear-gradient(145deg, #f8f9fa 0%, #cfd2d7 26%, #eef0f2 50%, #c2c6cc 72%, #a9adb4 100%);
  --fr-key: #bfc3c9;
  --fr-phone: linear-gradient(145deg, #ebe8e2 0%, #b8b4ab 30%, #e6e3dd 55%, #bdb9b0 75%, #9a968e 100%);
  --fr-phone-key: #b0aca3;
  --fr-glass: #0b0b0c;
  padding: 40px 0 72px;
  background: var(--sd-bg);
  color: var(--sd-text);
}

.sd-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.sd-noscript {
  padding: 16px;
  border: 1px solid var(--sd-line);
  border-radius: 12px;
  background: #fff;
}

/* 札の1段(勤務の時刻)。シフト表・カレンダー・紙で共通。休憩で前後に分かれる通しは2段にして、
   段の間に点線を引く(本物の .shift-grid-chip-line と同じ。点線は休憩で抜けている時間の印)。
   color-mix が使えない古い端末では字の色のままの点線になる */
.sd-cl {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sd-cl + .sd-cl {
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px dashed currentColor;
  border-top-color: color-mix(in srgb, currentColor 55%, transparent);
}

/* ---- 上の見出し ---- */

.page-hero.sd-hero {
  padding-bottom: 36px;
}

.sd-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.sd-flow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.sd-flow a:hover {
  border-color: var(--color-primary);
}

.sd-flow b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2fd2ff;
  color: #04121a;
  font-size: 13px;
}

.sd-hero-note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ---- 2つの組み方(2026-11-19) ----
   上の見出しに入口のカード2枚、本文にパターン1(予算を決めずに、すぐ組む)・パターン2(予算を決めて組む)の順 */

.sd-patterns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 880px;
  margin: 4px 0 16px;
}

.sd-pattern-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.sd-pattern-card:hover {
  border-color: var(--color-primary);
}

.sd-pattern-tag,
.sd-pattern-no {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: 999px;
  background: #0b2a3c;
  color: #2fd2ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sd-pattern-card b {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.sd-pattern-text {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.75;
}

.sd-pattern-card small {
  margin-top: auto;
  padding-top: 4px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}

.sd-pattern {
  scroll-margin-top: calc(var(--sd-head) - 1px);
}

/* 2つ目のパターンは、上のパターンと線と色で分ける */
.sd-pattern.is-second {
  border-top: 1px solid var(--sd-line);
  background: linear-gradient(180deg, #eef3f9 0%, #e6edf6 100%);
}

.sd-pattern-head {
  max-width: 880px;
  padding-bottom: 8px;
}

.sd-pattern-no {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 14px;
  font-size: 13px;
}

.sd-pattern-head h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.4;
}

.sd-pattern-head > p:not(.sd-pattern-no) {
  margin: 0 0 16px;
  color: var(--sd-muted);
  font-size: 15px;
  line-height: 1.85;
}

.sd-pattern-head .sd-flow {
  margin: 0;
}

/* ---- 手順(1つずつ) ---- */

.sd-step {
  position: relative;
  padding: 40px 0 56px;
  border-bottom: 1px dashed #c7d3e0;
  scroll-margin-top: calc(var(--sd-head) + 8px);
}

.sd-step:last-of-type {
  border-bottom: 0;
}

/* 左の列: 手順の見出しと、その下の説明(説明は画面の上に付いてくる) */
.sd-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  align-self: stretch;
}

.sd-step-head {
  max-width: 860px;
}

.sd-step-no {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--sd-muted);
}

.sd-step-no b {
  padding: 3px 12px;
  border-radius: 999px;
  background: #0b2a3c;
  color: #2fd2ff;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sd-step.is-done .sd-step-no b {
  background: var(--sd-done);
  color: #ffffff;
}

.sd-step-head h2,
.sd-step-head h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
}

.sd-step-lead {
  margin: 0;
  color: var(--sd-muted);
  font-size: 14px;
  line-height: 1.8;
}

.sd-step-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sd-stage {
  position: relative;
  min-width: 0;
}

/* まだ前の手順が終わっていない手順(薄くして、上に案内を重ねる) */
.sd-step.is-locked .sd-step-body {
  opacity: 0.38;
  filter: saturate(0.6);
  pointer-events: none;
  user-select: none;
}

.sd-lock {
  position: absolute;
  left: 50%;
  top: 220px;
  z-index: 8;
  width: min(440px, calc(100% - 32px));
  padding: 22px 24px;
  border: 1px solid var(--sd-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(20, 45, 80, 0.18);
  text-align: center;
  transform: translateX(-50%);
}

.sd-lock[hidden] {
  display: none;
}

.sd-lock-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.sd-lock-text {
  margin: 0 0 14px;
  color: var(--sd-muted);
  font-size: 13px;
  line-height: 1.7;
}

.sd-disclaimer {
  margin: 24px 0 0;
  color: var(--sd-faint);
  font-size: 12px;
  line-height: 1.8;
}

/* ---- 説明(左。画面の上に付いてくる) ---- */

.sd-guide {
  position: sticky;
  top: calc(var(--sd-head) + 16px);
  min-width: 0;
}

.sd-guide-card {
  padding: 18px 18px 16px;
  border: 1px solid #c9dbea;
  border-radius: 16px;
  background: var(--sd-panel);
  box-shadow: 0 14px 34px rgba(20, 45, 80, 0.12);
}

.sd-guide-card.is-nudge {
  animation: sd-nudge 0.5s ease-in-out;
}

.sd-guide-kicker {
  margin: 0 0 4px;
  color: var(--sd-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sd-guide-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.sd-guide-text {
  color: var(--sd-text);
  font-size: 14px;
  line-height: 1.8;
}

.sd-guide-text p {
  margin: 0 0 8px;
}

.sd-guide-text strong {
  color: #0b3a52;
}

.sd-guide-text .sd-yen-over {
  color: #c52016;
  font-weight: 800;
}

.sd-guide-text .sd-yen-ok {
  color: #137638;
  font-weight: 800;
}

.sd-guide-todo {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #ffc89e;
  border-radius: 12px;
  background: #fff4ea;
  color: #7a3a07;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.sd-guide-todo.is-done {
  border-color: #84d4b0;
  background: var(--sd-done-soft);
  color: #0f5d40;
}

.sd-guide-todo i {
  flex: none;
  font-style: normal;
}

.sd-guide-card.is-nudge .sd-guide-todo {
  border-color: var(--sd-hot);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.3);
}

.sd-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sd-gbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--sd-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sd-gbtn:hover {
  background: #eef3f8;
}

.sd-gbtn.is-primary {
  border-color: #0b9fd1;
  background: #0b9fd1;
  color: #ffffff;
}

.sd-gbtn.is-primary:hover {
  background: #0a8fbd;
}

.sd-gbtn.is-quiet {
  color: var(--sd-muted);
}

.sd-guide-steps {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #e3eaf2;
  list-style: none;
  counter-reset: sdg;
  font-size: 12.5px;
}

.sd-guide-steps li {
  position: relative;
  padding: 3px 0 3px 26px;
  color: var(--sd-faint);
  counter-increment: sdg;
}

.sd-guide-steps li::before {
  content: counter(sdg);
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 1px solid #c4d1e0;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.sd-guide-steps li.is-now {
  color: var(--sd-text);
  font-weight: 800;
}

.sd-guide-steps li.is-now::before {
  border-color: var(--sd-hot);
  background: var(--sd-hot);
  color: #ffffff;
}

.sd-guide-steps li.is-done {
  color: #0f5d40;
}

.sd-guide-steps li.is-done::before {
  content: "✓";
  border-color: var(--sd-done);
  background: var(--sd-done);
  color: #ffffff;
}

.sd-guide-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--sd-muted);
}

.sd-guide-legend i {
  display: inline-block;
  width: 22px;
  height: 11px;
  margin-right: 5px;
  border-radius: 3px;
  vertical-align: -1px;
}

/* 狭い幅で説明が画面の外に出たとき、上の帯のすぐ下に出す「いまやること」。
   押してほしい所に重なるときは下へ逃がす(.is-bottom。js/demo-shift.js の updatePill)。
   右は空けておく(下はサイト共通のチャットの丸いボタン、上はキッチンの「⋯ その他」が右の端にあるため) */
.sd-pill {
  position: fixed;
  left: 12px;
  top: calc(var(--sd-pill-top, 77px) + 8px);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 100px);
  padding: 9px 12px;
  border: 1px solid #ffc89e;
  border-radius: 14px;
  background: #fff4ea;
  color: #7a3a07;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 10px 26px rgba(20, 45, 80, 0.2);
}

.sd-pill.is-bottom {
  top: auto;
  bottom: 14px;
}

.sd-pill[hidden] {
  display: none;
}

.sd-pill button {
  flex: none;
  padding: 4px 9px;
  border: 1px solid #ffc89e;
  border-radius: 999px;
  background: #ffffff;
  color: #7a3a07;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* ---- 押してほしい所(光る輪) ---- */

.sd-hot {
  position: relative;
  z-index: 1;
  animation: sd-hot 1.3s ease-in-out infinite;
}

@keyframes sd-hot {
  0%, 100% { box-shadow: 0 0 0 2px var(--sd-hot), 0 0 0 5px rgba(255, 138, 61, 0.15); }
  50% { box-shadow: 0 0 0 3px var(--sd-hot), 0 0 0 9px rgba(255, 138, 61, 0.38); }
}

@keyframes sd-nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* 説明だけの所(押す物は無いが、ここを見てほしい) */
.sd-look {
  animation: sd-look 1.6s ease-in-out infinite;
}

@keyframes sd-look {
  0%, 100% { box-shadow: 0 0 0 2px rgba(11, 159, 209, 0.9), 0 0 0 6px rgba(11, 159, 209, 0.12); }
  50% { box-shadow: 0 0 0 3px rgba(11, 159, 209, 1), 0 0 0 11px rgba(11, 159, 209, 0.25); }
}

@media (prefers-reduced-motion: reduce) {
  .sd-hot,
  .sd-look,
  .sd-guide-card.is-nudge {
    animation: none;
  }
  .sd-hot {
    box-shadow: 0 0 0 3px var(--sd-hot);
  }
  .sd-look {
    box-shadow: 0 0 0 3px rgba(11, 159, 209, 1);
  }
}

/* ==========================================================================
   端末の縁(iPad・iPhone・ブラウザ)
   ========================================================================== */

.sd-device {
  position: relative;
}

.sd-device[hidden] {
  display: none;
}

.sd-bezel {
  position: relative;
}

.sd-glass {
  position: relative;
  background: var(--fr-glass);
}

.sd-screen {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  background: #ffffff;
  isolation: isolate;
}

/* iPad: 金属の縁・黒い額縁・前のカメラ・上のボタン */
.is-ipad .sd-bezel {
  padding: 3px;
  border-radius: 28px;
  background: var(--fr-metal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.18), var(--sd-device-shadow);
}

.is-ipad .sd-bezel::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 12%;
  width: 34px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--fr-key);
}

.is-ipad .sd-bezel::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 14%;
  width: 62px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--fr-key) 0 26px, transparent 26px 36px, var(--fr-key) 36px 62px);
}

.is-ipad .sd-glass {
  padding: 14px;
  border-radius: 25px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.is-ipad .sd-glass::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a5b78 0, #121722 55%, #05070b 100%);
}

/* 端末の高さは、手順の頭へ送ったときに画面の高さに収まる大きさ(上の帯 + 余白のぶんを引く) */
.is-ipad .sd-screen {
  height: clamp(540px, calc(100svh - var(--sd-head) - 92px), 820px);
  border-radius: 12px;
}

/* iPhone: チタンの縁・細い額縁・ボタン */
.is-phone {
  display: flex;
  justify-content: center;
}

.is-phone .sd-bezel {
  width: min(100%, 368px);
  padding: 3px;
  border-radius: 48px;
  background: var(--fr-phone);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.2), var(--sd-device-shadow);
}

.is-phone .sd-bezel::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 110px;
  width: 3px;
  height: 100px;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(180deg, var(--fr-phone-key) 0 18px, transparent 18px 32px, var(--fr-phone-key) 32px 64px, transparent 64px 70px, var(--fr-phone-key) 70px 100px);
}

.is-phone .sd-bezel::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 150px;
  width: 3px;
  height: 56px;
  border-radius: 0 2px 2px 0;
  background: var(--fr-phone-key);
}

.is-phone .sd-glass {
  padding: 7px;
  border-radius: 45px;
}

.is-phone .sd-screen {
  height: clamp(560px, calc(100svh - var(--sd-head) - 76px), 760px);
  border-radius: 38px;
}

/* STEP 5 は画面の上に「見る場所の切り替え」があるぶん、端末を低くする(手順の頭へ送ったときに下が切れないように) */
#sd-step-5 .is-phone .sd-screen {
  height: clamp(520px, calc(100svh - var(--sd-head) - 132px), 720px);
}

#sd-step-5 .is-ipad .sd-screen {
  height: clamp(500px, calc(100svh - var(--sd-head) - 150px), 780px);
}

/* パソコンのブラウザの窓(本部ポータル) */
.sd-window {
  overflow: hidden;
  border: 1px solid #c6cfda;
  border-radius: 12px;
  background: #e9edf2;
  box-shadow: var(--sd-device-shadow);
}

.sd-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #d4dbe4;
  background: linear-gradient(180deg, #f4f6f9, #e6eaef);
}

.sd-window-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d0d6de;
}

.sd-window-url {
  flex: 1;
  max-width: 460px;
  margin-left: 12px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #ffffff;
  color: #5b6472;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.is-browser .sd-screen {
  height: clamp(520px, calc(100svh - var(--sd-head) - 112px), 760px);
}

/* 紙(PDF を印刷したもの) */
.sd-paper {
  position: relative;
  margin: 26px auto 0;
  max-width: 980px;
}

.sd-paper[hidden] {
  display: none;
}

/* 見る場所の切り替え(STEP 5) */
.sd-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sd-view {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--sd-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sd-view[aria-pressed="true"] {
  border-color: #0b9fd1;
  background: #0b9fd1;
  color: #ffffff;
}

.sd-view:disabled {
  opacity: 0.45;
  cursor: default;
}

.sd-view b {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.8;
}

/* ---- 端末の上の帯(時計・電池)・通知・確かめの窓 ---- */

.sd-status {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 24px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #111418;
}

.sd-status-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sd-battery {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.sd-battery::before {
  content: "";
  position: absolute;
  inset: 1px;
  right: 3px;
  border-radius: 1px;
  background: currentColor;
}

.sd-battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
}

.is-phone .sd-status {
  height: 44px;
  padding: 0 28px;
  font-size: 14px;
}

.sd-island {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 104px;
  height: 28px;
  margin-left: -52px;
  border-radius: 999px;
  background: #050506;
}

.sd-homebar {
  position: absolute;
  left: 50%;
  bottom: 7px;
  z-index: 30;
  width: 120px;
  height: 4px;
  margin-left: -60px;
  border-radius: 3px;
  background: rgba(20, 20, 20, 0.55);
  pointer-events: none;
}

/* 端末に届く通知(iPhone・iPad の上から降りてくる帯) */
.sd-banner {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 40;
  display: flex;
  gap: 10px;
  width: min(420px, calc(100% - 20px));
  padding: 11px 13px;
  border-radius: 18px;
  background: rgba(246, 246, 248, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  color: #111418;
  text-align: left;
  transform: translateX(-50%);
  animation: sd-drop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  backdrop-filter: blur(12px);
}

.sd-banner.is-tap {
  cursor: pointer;
}

@keyframes sd-drop {
  from { opacity: 0; transform: translate(-50%, -40px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.sd-banner-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
}

.sd-banner-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sd-banner-main {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
}

.sd-banner-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6b7280;
  font-size: 11.5px;
}

.sd-banner-title {
  display: block;
  font-weight: 700;
}

/* iPadOS の「OK / キャンセル」の確かめの窓(本物は window.confirm) */
.sd-alert-back {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
}

.sd-alert {
  width: min(300px, calc(100% - 40px));
  overflow: hidden;
  border-radius: 16px;
  background: rgba(244, 244, 246, 0.97);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.sd-alert-host {
  padding: 18px 18px 4px;
  font-size: 15px;
  font-weight: 700;
}

.sd-alert-msg {
  padding: 4px 18px 16px;
  font-size: 13px;
  line-height: 1.55;
}

.sd-alert-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(60, 60, 67, 0.25);
}

.sd-alert-btns button {
  padding: 11px 6px;
  border: 0;
  background: transparent;
  color: #0a7aff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.sd-alert-btns button + button {
  border-left: 1px solid rgba(60, 60, 67, 0.25);
  font-weight: 700;
}

/* ==========================================================================
   シフトアプリ(スタッフのスマホ)。本物の client/src/shift/shift.css の形・暖色のライト
   ========================================================================== */

.ap {
  position: relative;
  --c-bg: #fefdfb;
  --c-surface: #ffffff;
  --c-surface-alt: #f8f5f1;
  --c-border: #ece6e0;
  --c-text: #2b221b;
  --c-muted: #5d554c;
  --c-primary: #1470c4;
  --c-primary-dark: #0b6fcd;
  --c-primary-soft: rgba(20, 112, 196, 0.1);
  --c-on-soft-primary: #1368b6;
  --c-gold: #a64700;
  --c-gold-soft: rgba(166, 71, 0, 0.12);
  --c-danger: #d92318;
  --c-danger-soft: rgba(217, 35, 24, 0.1);
  --c-on-soft-danger: #c52016;
  --c-success: #15803d;
  --c-success-soft: rgba(21, 128, 61, 0.1);
  --c-on-soft-success: #137638;
  --c-tint-chip: rgba(43, 34, 27, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
  background: radial-gradient(1200px 560px at 12% -10%, rgba(238, 128, 20, 0.022), transparent 62%), linear-gradient(170deg, #ffffff, #fefdfb 60%, #fcfaf6 100%);
  color: var(--c-text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* :where で詳細度を 0 にする(個別のボタンの色・大きさが負けないように) */
.ap :where(button, input, select, textarea) {
  font: inherit;
}

.ap-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 8px 14px 10px;
  background: linear-gradient(170deg, #ffffff, #f8f4ef 88%);
  border-bottom: 1px solid var(--c-border);
}

.ap-logo {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.ap-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ap-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.ap-store {
  font-size: 12px;
  color: var(--c-muted);
}

.ap-name {
  font-size: 15px;
  font-weight: 700;
}

.ap-theme {
  margin-left: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: rgba(43, 34, 27, 0.035);
  color: var(--c-text);
  font-size: 15px;
}

.ap-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ap-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 12px 90px;
}

.ap-subtabs {
  display: flex;
  gap: 6px;
}

.ap-subtab {
  flex: 1;
  padding: 10px 4px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 700;
}

.ap-subtab.is-active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #ffffff;
}

.ap-card {
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  box-shadow: 0 1px 3px rgba(90, 68, 45, 0.09);
}

.ap-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.ap-card h3 + h3,
.ap-card * + h3 {
  margin-top: 14px;
}

.ap-muted {
  margin: 4px 0;
  color: var(--c-muted);
  font-size: 13px;
}

.ap-success {
  padding: 10px 12px;
  border: 1px solid var(--c-success);
  border-radius: 8px;
  background: var(--c-success-soft);
  color: var(--c-on-soft-success);
  font-size: 14px;
}

.ap-month-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ap-month-nav {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  color: var(--c-text);
  font-size: 18px;
}

.ap-month-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}

.ap-link {
  padding: 8px 0 0;
  border: 0;
  background: none;
  color: var(--c-primary);
  font-size: 14px;
}

.ap-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.ap-cal-head {
  padding-bottom: 2px;
  color: var(--c-muted);
  font-size: 12px;
  text-align: center;
}

.ap-cal-head.is-w0,
.ap-cal-cell.is-w0 .ap-cal-day {
  color: var(--c-danger);
}

.ap-cal-head.is-w6,
.ap-cal-cell.is-w6 .ap-cal-day {
  color: var(--c-primary);
}

.ap-cal-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 4px 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  overflow: hidden;
  text-align: left;
}

.ap-cal-cell.is-blank {
  background: transparent;
}

.ap-cal-cell.is-open {
  border-color: var(--c-border);
}

.ap-cal-cell.is-selected {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 1px rgba(31, 123, 210, 0.3);
}

.ap-cal-day {
  padding-left: 2px;
  font-size: 13px;
  font-weight: 700;
}

.ap-cal-chip {
  padding: 2px 3px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 勤務の時刻の札。マスが狭い(約39px)ので、「18-」の下に「23:30」と折り返す(折り返し所は js の <wbr>) */
.ap-cal-chip.is-time {
  padding: 2px 1px;
  letter-spacing: -0.02em;
  text-align: center;
}

.ap-cal-chip .sd-cl {
  white-space: normal;
  text-overflow: clip;
}

.ap-cal-chip.is-request {
  border-style: dashed;
  background: var(--c-tint-chip);
}

.ap-cal-chip.is-off {
  background: var(--c-danger-soft);
  color: var(--c-on-soft-danger);
  text-align: center;
}

.ap-cal-chip.is-todo {
  border: 1px dashed var(--c-border);
  color: var(--c-muted);
  text-align: center;
}

.ap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--c-muted);
  font-size: 12px;
}

.ap-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ap-legend i {
  width: 18px;
  height: 10px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.ap-legend i.is-request {
  border-style: dashed;
  background: var(--c-tint-chip);
}

.ap-legend i.is-todo {
  border: 1px dashed var(--c-border);
}

.ap-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ap-day-nav {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  font-size: 13px;
}

.ap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ap-chip {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 88px;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: transparent;
  color: var(--c-muted);
}

.ap-chip-name {
  font-size: 13px;
  font-weight: 700;
}

.ap-chip-time {
  font-size: 11px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.ap-chip.is-active {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-on-soft-primary);
}

.ap-chip.is-off.is-active {
  border-color: var(--c-danger);
  background: var(--c-danger-soft);
  color: var(--c-on-soft-danger);
}

.ap-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ap-row > button {
  flex: 1;
}

.ap-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
}

.ap-btn.is-primary {
  background: linear-gradient(160deg, var(--c-primary), var(--c-primary-dark));
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(31, 123, 210, 0.3);
}

.ap-btn.is-secondary {
  border-color: var(--c-border);
  background: var(--c-surface-alt);
  color: var(--c-text);
}

.ap-btn:disabled {
  opacity: 0.45;
}

.ap-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  color: var(--c-muted);
  font-size: 13px;
}

.ap-field input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  font-size: 15px;
}

.ap-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  padding-bottom: 16px;
  background: linear-gradient(170deg, #ffffff, #f8f4ef 88%);
  border-top: 1px solid var(--c-border);
}

.ap-nav button {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 0 6px;
  border: 0;
  background: none;
  color: var(--c-muted);
  font-size: 10.5px;
}

.ap-nav button.is-active {
  color: var(--c-primary);
}

.ap-nav-icon {
  font-size: 19px;
  line-height: 1;
}

/* その日のシフト表(全員の帯) */
.ap-dayboard {
  overflow-x: auto;
}

.ap-dayboard-inner {
  min-width: 100%;
}

.ap-db-row {
  display: flex;
  align-items: center;
  height: 30px;
  border-bottom: 1px solid var(--c-border);
}

.ap-db-row.is-me {
  background: rgba(20, 112, 196, 0.06);
}

.ap-db-name {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
  width: 84px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ap-db-track {
  position: relative;
  flex: 1;
  height: 100%;
}

.ap-db-ruler {
  color: var(--c-muted);
  font-size: 10px;
}

.ap-db-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--c-border);
  padding-left: 2px;
}

.ap-db-band {
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: 4px;
}

.ap-me-tag {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--c-primary);
  color: #ffffff;
  font-size: 9px;
}

.ap-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* ロック画面(STEP 5 の通知) */
.ap-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 14px 0;
  background:
    radial-gradient(500px 360px at 20% 10%, rgba(47, 210, 255, 0.55), transparent 60%),
    radial-gradient(500px 420px at 90% 80%, rgba(255, 138, 61, 0.45), transparent 60%),
    linear-gradient(170deg, #1b3a5b, #0d1b2c 70%);
  color: #ffffff;
}

.ap-lock-date {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.9;
}

.ap-lock-time {
  font-size: 74px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.ap-lock .sd-banner {
  position: relative;
  left: auto;
  top: auto;
  margin-top: 26px;
  transform: none;
  animation: sd-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes sd-pop {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.ap-lock-hint {
  margin-top: auto;
  margin-bottom: 30px;
  font-size: 12px;
  opacity: 0.75;
}

/* スマホのシフト表(見る用・週) */
.ap-board-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ap-board-nav,
.ap-board-span {
  display: flex;
  gap: 4px;
}

.ap-board-span button {
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: 12px;
}

.ap-board-span button.is-active {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-on-soft-primary);
  font-weight: 700;
}

.ap-board-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

/* ==========================================================================
   見る用のシフト表(レジ・キッチン・スマホで共通の形。本物の ShiftViewGrid)
   ========================================================================== */

.vw-scroll {
  overflow: auto;
  border: 1px solid var(--c-border, #ccd4dd);
  border-radius: 10px;
  background: var(--c-surface, #ffffff);
}

.vw-grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.vw-grid th,
.vw-grid td {
  padding: 4px;
  border-bottom: 1px solid var(--c-border, #ccd4dd);
  border-right: 1px solid var(--c-line-soft, rgba(0, 0, 0, 0.05));
  vertical-align: top;
}

.vw-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--c-surface-alt, #f1f5f8);
  color: var(--c-muted, #566270);
  font-weight: 700;
  white-space: nowrap;
}

.vw-name {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 110px;
  min-width: 110px;
  background: var(--c-surface, #ffffff);
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.vw-grid thead th.vw-name {
  z-index: 3;
}

.is-compact .vw-name {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vw-date {
  min-width: 92px;
  text-align: center;
}

.is-compact .vw-date {
  min-width: 62px;
}

.vw-date small {
  display: block;
  font-size: 10px;
  font-weight: 500;
}

.vw-date.is-weekend {
  color: var(--c-accent-text, #98520d);
}

.vw-group th,
.vw-group td {
  background: var(--c-surface-alt, #f1f5f8);
  color: var(--c-muted, #566270);
  font-size: 11px;
  font-weight: 700;
}

.vw-chip {
  display: block;
  margin-bottom: 2px;
  padding: 3px 4px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.vw-chip small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vw-me td,
.vw-me th {
  background: rgba(20, 112, 196, 0.06);
}

.vw-me .vw-name {
  box-shadow: inset 3px 0 0 var(--c-primary, #1470c4);
}

.vw-resv {
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
}

.vw-resv i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-radius: 2px;
  background: #38bdf8;
}

/* ==========================================================================
   レジ(お店の iPad)。本物の client/src/index.css の .app-shell.is-light(寒色の紙)と
   client/src/pages/shiftAdmin.css の形
   ========================================================================== */

/* 本部の「シフトの承認」の窓に出す表(.hq-board)も、レジの配色のまま出す
   (本物はレジの表を hq-embed app-shell is-light の入れ物に入れて出す。client/src/hq/HqStoreScope.jsx) */
.rg,
.hq-board {
  --c-bg: #f2f5f8;
  --c-surface: #ffffff;
  --c-surface-alt: #f1f5f8;
  --c-border: #ccd4dd;
  --c-line-soft: #dae1e8;
  --c-text: #141c26;
  --c-muted: #566270;
  --c-primary: #0f6dc0;
  --c-primary-soft: rgba(15, 109, 192, 0.1);
  --c-on-soft-primary: #1368b6;
  --c-accent: #ee8014;
  --c-accent-dark: #d2620a;
  --c-accent-soft: rgba(238, 128, 20, 0.12);
  --c-accent-text: #98520d;
  --c-gold: #a64700;
  --c-gold-soft: rgba(166, 71, 0, 0.12);
  --c-success: #15803d;
  --c-success-soft: rgba(21, 128, 61, 0.1);
  --c-on-soft-success: #137638;
  --c-danger: #d92318;
  --c-danger-soft: rgba(217, 35, 24, 0.1);
  --c-on-soft-danger: #c52016;
  --c-warning: #9a6410;
  --c-warning-soft: rgba(154, 100, 16, 0.12);
  --c-on-soft-warning: #8a5a0e;
}

.rg {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: radial-gradient(1200px 560px at 12% -10%, rgba(47, 210, 255, 0.07), transparent 62%), linear-gradient(170deg, #fbfcfd, #f3f6f9 55%, #e9eef3 100%);
  color: var(--c-text);
  font-family: "Inter", "Roboto", -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.rg :where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
}

.rg .sd-status {
  background: #2fd2ff;
}

.rg-topbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  background: #2fd2ff;
  color: #04121a;
}

.rg-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #04121a;
  color: #ffffff;
  font-size: 16px;
}

.rg-iconbtn.is-dim {
  background: rgba(4, 18, 26, 0.18);
  color: #04121a;
}

.rg-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
}

.rg-logo img {
  display: block;
  height: 30px;
  width: auto;
}

.rg-logo img + img {
  height: 26px;
}

.rg-store {
  flex: 1;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(4, 18, 26, 0.25);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rg-who {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.rg-logout {
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  background: #04121a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.rg-main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 0;
}

.rg-nav {
  display: flex;
  flex: none;
  gap: 7px;
  padding: 7px 10px 10px;
  background: #2fd2ff;
}

.rg-nav button {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 46px;
  padding: 5px 2px;
  border: 1px solid rgba(4, 18, 26, 0.16);
  border-radius: 11px;
  background: #ffffff;
  color: #04121a;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.rg-nav button.is-active {
  border-color: #04121a;
  background: #04121a;
  color: #ffffff;
}

.rg-nav button.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: #2fd2ff;
}

.rg-nav svg {
  width: 18px;
  height: 18px;
}

.rg-nav small {
  font-size: 9.5px;
  opacity: 0.8;
}

/* シフト作成の画面 */
.rg-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 14px;
}

.rg-page h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.rg-notice {
  padding: 10px 14px;
  border: 1px solid var(--c-success);
  border-radius: 8px;
  background: var(--c-success-soft);
  color: var(--c-on-soft-success);
}

.rg-error {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--c-danger-soft);
  color: var(--c-on-soft-danger);
}

.rg-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}

.rg-tab {
  padding: 9px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--c-muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.rg-tab.is-active {
  border-bottom-color: var(--c-primary);
  color: var(--c-primary);
}

.rg-switch {
  display: flex;
  gap: 4px;
}

.rg-switch button {
  padding: 7px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  color: var(--c-muted);
  font-size: 14px;
}

.rg-switch button.is-active {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-on-soft-primary);
  font-weight: 600;
}

.rg-toolbar,
.rg-statusbar,
.rg-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rg-statusbar,
.rg-summary {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  font-size: 14px;
}

.rg-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.rg-select {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  font-size: 14px;
}

.rg-badge {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.rg-badge.is-draft {
  background: var(--c-accent-soft);
  color: var(--c-accent-text);
}

.rg-badge.is-published {
  background: var(--c-success-soft);
  color: var(--c-on-soft-success);
}

.rg-item {
  color: var(--c-muted);
}

.rg-pending {
  margin-left: 6px;
  color: var(--c-accent);
}

.rg-btn {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.rg-btn.is-primary {
  border: 0;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  color: #1a1005;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(210, 98, 10, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rg-btn:disabled {
  opacity: 0.45;
}

/* シフトの承認(作成中の表の上) */
.rg-appr {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--c-surface-alt);
  font-size: 14px;
}

.rg-appr.tone-pending {
  border-left-color: var(--c-warning);
  background: var(--c-warning-soft);
}

.rg-appr.tone-approved {
  border-left-color: var(--c-success);
  background: var(--c-success-soft);
}

.rg-appr.tone-locked {
  border-left-color: var(--c-primary);
  background: var(--c-primary-soft);
}

.rg-appr-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.rg-appr-title {
  font-weight: 700;
}

.rg-appr-badge {
  padding: 2px 10px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.rg-appr-badge.tone-pending {
  border-color: var(--c-warning);
  color: var(--c-on-soft-warning);
}

.rg-appr-badge.tone-approved {
  border-color: var(--c-success);
  color: var(--c-on-soft-success);
}

.rg-appr-who {
  color: var(--c-muted);
  font-size: 13px;
}

.rg-appr-quote {
  padding: 6px 10px;
  border-left: 3px solid var(--c-border);
  border-radius: 0 6px 6px 0;
  background: var(--c-surface);
  white-space: pre-wrap;
}

.rg-appr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 期間の人件費のカード */
.rg-cost {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 10px 16px;
  border: 1px solid var(--c-gold);
  border-radius: 10px;
  background: var(--c-gold-soft);
}

.rg-cost-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.rg-cost-label,
.rg-cost-sub {
  color: var(--c-muted);
  font-size: 13px;
}

.rg-cost-amount {
  color: var(--c-gold);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rg-budget-line {
  display: flex;
  flex-wrap: wrap;
  flex-basis: 100%;
  align-items: center;
  gap: 8px 14px;
  font-size: 14px;
}

.rg-budget-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rg-budget-amount small {
  margin-left: 6px;
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 400;
}

.rg-budget-bar {
  position: relative;
  width: 160px;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  background: var(--c-surface);
}

.rg-budget-bar > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--c-success);
}

.rg-cost.budget-near .rg-budget-bar > span {
  background: var(--c-warning);
}

.rg-cost.budget-over .rg-budget-bar > span {
  background: var(--c-danger);
}

.rg-verdict {
  font-weight: 800;
}

.rg-verdict.tone-within {
  color: var(--c-on-soft-success);
}

.rg-verdict.tone-near {
  color: var(--c-on-soft-warning);
}

.rg-verdict.tone-over {
  color: var(--c-on-soft-danger);
}

.rg-alert {
  padding: 10px 12px;
  border: 1px solid var(--c-danger);
  border-radius: 8px;
  background: var(--c-danger-soft);
  color: var(--c-on-soft-danger);
  font-size: 14px;
  font-weight: 700;
}

/* ポチポチ入力 */
.rg-paint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 12px;
  border: 1px dashed var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  font-size: 13px;
}

.rg-paint.is-armed {
  position: sticky;
  top: 0;
  z-index: 5;
  border-style: solid;
  border-color: var(--c-primary);
  background: var(--c-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.rg-paint-label {
  color: var(--c-muted);
  font-weight: 700;
  white-space: nowrap;
}

.rg-paint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rg-paint-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 12px;
  line-height: 1.2;
}

.rg-paint-chip b {
  font-weight: 700;
}

.rg-paint-chip small {
  color: var(--c-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.rg-paint-chip.is-active {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-on-soft-primary);
  box-shadow: 0 0 0 2px var(--c-primary-soft);
}

.rg-paint-chip.is-active small {
  color: inherit;
}

.rg-paint-chip.is-off.is-active {
  border-color: var(--c-danger);
  background: var(--c-danger-soft);
  color: var(--c-on-soft-danger);
  box-shadow: 0 0 0 2px var(--c-danger-soft);
}

.rg-paint-hint {
  flex-basis: 100%;
  color: var(--c-muted);
  font-size: 12px;
}

.rg-paint.is-armed .rg-paint-hint {
  color: var(--c-text);
}

/* シフト表(縦=スタッフ・横=日付) */
.rg-grid-scroll {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface);
}

.rg-grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.rg-grid th,
.rg-grid td {
  padding: 0;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid rgba(20, 28, 38, 0.06);
}

.rg-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--c-surface-alt);
  color: var(--c-muted);
  font-size: 12px;
  white-space: nowrap;
}

.rg-g-name {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 140px;
  min-width: 140px;
  padding: 4px 10px !important;
  background: var(--c-surface);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.rg-g-pay {
  width: 112px;
  min-width: 112px;
  padding: 3px 10px !important;
  background: var(--c-surface);
  text-align: right;
  border-right: 1px solid var(--c-border) !important;
}

.rg-g-pos {
  width: 74px;
  min-width: 74px;
  padding: 6px 8px !important;
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: 12px;
  text-align: center;
}

.rg-grid thead th.rg-g-name,
.rg-grid thead th.rg-g-pay,
.rg-grid thead th.rg-g-pos {
  z-index: 4;
  background: var(--c-surface-alt);
}

.rg-g-pay b {
  display: block;
  color: var(--c-gold);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rg-g-pay small {
  display: block;
  color: var(--c-muted);
  font-size: 10px;
  line-height: 1.25;
}

.rg-g-pay b.tone-green { color: var(--c-success); }
.rg-g-pay b.tone-amber { color: var(--c-warning); }
.rg-g-pay b.tone-red { color: var(--c-danger); }
.rg-g-pay b.is-plain { color: var(--c-text); }

.rg-g-date {
  min-width: 72px;
  padding: 7px 4px !important;
  font-weight: 700;
  text-align: center;
}

.rg-g-date.is-weekend {
  color: var(--c-accent);
}

/* 日付を押すと、表の下の「その日の時間帯」がその日になる。いま下に出ている日は青い下線 */
.rg-g-datebtn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 700;
  cursor: pointer;
}

.rg-g-datebtn:hover {
  text-decoration: underline;
}

.rg-grid thead th.rg-g-date.is-open {
  background: var(--c-primary-soft);
  color: var(--c-primary);
  box-shadow: inset 0 -3px 0 var(--c-primary);
}

.rg-g-cell.is-weekend,
.rg-g-cost.is-weekend {
  background: rgba(255, 154, 61, 0.05);
}

.rg-g-group th,
.rg-g-group td {
  height: 26px;
  background: var(--c-surface-alt);
  font-size: 12px;
}

.rg-g-group .rg-g-name small {
  margin-left: 6px;
  color: var(--c-muted);
  font-weight: 400;
}

.rg-g-count {
  color: var(--c-muted);
  text-align: center;
  font-weight: 700;
}

.rg-g-sep > * {
  border-top: 3px double var(--c-border) !important;
}

.rg-g-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}

.rg-g-me .rg-g-name {
  box-shadow: inset 4px 0 0 #f0a020;
}

.rg-g-cellbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 2px 3px;
  border: 0;
  background: none;
  cursor: default;
}

.rg-grid.is-painting .rg-g-cellbtn {
  cursor: crosshair;
}

.rg-grid.is-painting .rg-g-cellbtn:hover {
  background: var(--c-primary-soft);
}

.rg-g-chip {
  display: block;
  width: 100%;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rg-g-chip.is-draft,
.rg-g-chip.is-request {
  border-style: dashed;
}

.rg-g-chip.is-off {
  background: repeating-linear-gradient(45deg, rgba(217, 35, 24, 0.12) 0 5px, transparent 5px 10px);
  border-color: rgba(217, 35, 24, 0.4);
  color: var(--c-danger);
}

.rg-g-chip.is-off.is-decided {
  background: repeating-linear-gradient(45deg, rgba(217, 35, 24, 0.24) 0 5px, rgba(217, 35, 24, 0.08) 5px 10px);
  border-color: var(--c-danger);
}

.rg-g-chip.is-flash {
  animation: sd-flash 0.7s ease-out;
}

@keyframes sd-flash {
  from { box-shadow: 0 0 0 4px rgba(15, 109, 192, 0.45); }
  to { box-shadow: 0 0 0 0 rgba(15, 109, 192, 0); }
}

.rg-grid tfoot th,
.rg-grid tfoot td {
  background: var(--c-surface-alt);
  font-weight: 700;
}

.rg-g-foot small {
  display: block;
  color: var(--c-muted);
  font-size: 10px;
  font-weight: 400;
}

.rg-g-cost {
  padding: 5px 6px !important;
  color: var(--c-gold);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.rg-g-cost small {
  display: block;
  color: var(--c-muted);
  font-size: 10px;
  font-weight: 400;
}

.rg-g-cost.is-over {
  background: var(--c-danger-soft) !important;
  color: var(--c-on-soft-danger);
}

.rg-g-ratio {
  padding: 4px 3px !important;
  color: var(--c-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rg-g-ratio b {
  display: block;
  font-size: 11px;
}

.rg-g-ratio small {
  display: block;
  font-size: 10px;
  font-weight: 700;
}

.rg-g-ratio.tone-green {
  background: var(--c-success-soft) !important;
  color: var(--c-on-soft-success);
}

.rg-g-ratio.tone-amber {
  background: var(--c-warning-soft) !important;
  color: var(--c-on-soft-warning);
}

.rg-g-ratio.tone-red {
  background: var(--c-danger-soft) !important;
  color: var(--c-on-soft-danger);
}

.rg-g-sales {
  position: relative;
  height: 38px;
  padding: 0 !important;
  overflow: hidden;
  vertical-align: bottom;
}

.rg-g-sales i {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  border-top: 1px solid rgba(166, 71, 0, 0.55);
  background: linear-gradient(180deg, rgba(240, 200, 105, 0.42), rgba(240, 200, 105, 0.16));
}

.rg-g-sales span {
  position: relative;
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---- その日の時間帯(1日分の帯の表)。本物の pages/shiftAdmin.css の .shift-dayview・.shift-board の形 ---- */
.rg-dayview {
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--c-primary);
  border-radius: 10px;
  background: var(--c-surface-alt);
}

.rg-dayview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.rg-dayview-head strong {
  font-size: 15px;
}

.rg-dayview-head .rg-item {
  color: var(--c-muted);
  font-size: 13px;
}

.rg-dayview-hint {
  color: var(--c-muted);
  font-size: 12px;
}

.rg-dayview-head .rg-btn {
  margin-left: auto;
}

.rg-tl-scroll {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface);
}

.rg-tl {
  min-width: 660px;
}

.rg-tl-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--c-border);
}

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

/* 名前の列は、横に動かしても左に貼り付いたまま */
.rg-tl-name {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  width: 150px;
  padding: 0 10px;
  border-right: 1px solid var(--c-border);
  background: var(--c-surface);
  font-size: 13px;
  font-weight: 700;
}

.rg-tl-name .rg-g-dot {
  margin-right: 0;
}

.rg-tl-person {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rg-tl-hours {
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.rg-tl-row.is-me .rg-tl-name {
  box-shadow: inset 4px 0 0 #f0a020;
}

/* 時刻の線。30分ごとに薄い線、1時間ごとに濃い線 */
.rg-tl-track {
  position: relative;
  flex: 1;
  height: 44px;
  background-image:
    linear-gradient(to right, var(--c-border) 0 1px, transparent 1px),
    linear-gradient(to right, rgba(20, 28, 38, 0.06) 0 1px, transparent 1px);
  background-size: calc(100% / 9) 100%, calc(100% / 18) 100%;
}

.rg-tl-head .rg-tl-track {
  height: 26px;
}

.rg-tl-head .rg-tl-name {
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 400;
  background: var(--c-surface-alt);
}

.rg-tl-head .rg-tl-track {
  background-color: var(--c-surface-alt);
}

.rg-tl-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 5px 0 0 3px;
  color: var(--c-muted);
  font-size: 11px;
  white-space: nowrap;
}

/* 持ち場の見出しの行(30分ごとの、その持ち場で店に立っている人数) */
.rg-tl-group .rg-tl-track {
  height: 28px;
  background-color: var(--c-surface-alt);
}

.rg-tl-group .rg-tl-name {
  background: var(--c-surface-alt);
}

.rg-tl-group.is-sep {
  border-top: 3px double var(--c-border);
}

.rg-tl-gname {
  flex: 1;
  font-size: 12px;
}

.rg-tl-gcount {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 希望 = 薄い塗り(破線)。まだ勤務ではない */
.rg-tl-req {
  position: absolute;
  top: 3px;
  bottom: 3px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  border: 1px dashed;
  border-radius: 5px;
}

.rg-tl-req > span {
  padding: 1px 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* 勤務 = 作成中は中くらいの濃さ+破線、確定後は濃いベタ塗り */
.rg-tl-band {
  position: absolute;
  top: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 5px;
  border: 2px solid;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rg-tl-band.is-draft {
  border-style: dashed;
}

.rg-tl-band.is-published {
  box-shadow: 0 2px 6px rgba(20, 28, 38, 0.25);
}

.rg-tl-band > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 休憩の時間帯。帯を切った跡が「入れ忘れた空き」に見えないよう、斜線を敷く */
.rg-tl-break {
  position: absolute;
  top: 13px;
  bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--c-muted);
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, rgba(86, 98, 112, 0.18) 0 5px, transparent 5px 10px);
  color: var(--c-muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* 休み希望(その日ぜんぶ) */
.rg-tl-offreq {
  position: absolute;
  inset: 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: repeating-linear-gradient(45deg, rgba(217, 35, 24, 0.12) 0 6px, transparent 6px 12px);
  color: var(--c-danger);
  font-size: 11px;
  font-weight: 700;
}

/* 一番下の行: その30分に店に立っている人数(塗りの濃さは4段階)と、休憩中の人数 */
.rg-tl-count {
  border-top: 2px solid var(--c-border);
}

.rg-tl-count .rg-tl-name,
.rg-tl-count .rg-tl-track {
  background-color: var(--c-surface-alt);
}

.rg-tl-count .rg-tl-track {
  height: 38px;
}

.rg-tl-ctitle {
  color: var(--c-muted);
  font-size: 12px;
}

.rg-tl-ccell {
  position: absolute;
  top: 3px;
  bottom: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.rg-tl-ccell.is-level-1 { background: rgba(15, 109, 192, 0.12); }
.rg-tl-ccell.is-level-2 { background: rgba(15, 109, 192, 0.24); }
.rg-tl-ccell.is-level-3 { background: rgba(15, 109, 192, 0.38); }

.rg-tl-ccell b {
  color: var(--c-text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rg-tl-ccell i {
  padding: 0 3px;
  border-radius: 3px;
  background: var(--c-gold);
  color: #ffffff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.rg-tl-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 2px 0;
  color: var(--c-muted);
  font-size: 12px;
}

.rg-tl-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rg-tl-legend > span.is-note {
  display: inline;
}

.rg-tl-legend i {
  display: inline-block;
  width: 22px;
  height: 12px;
  border: 1px solid var(--c-primary);
  border-radius: 4px;
}

.rg-tl-legend i.is-request { background: rgba(15, 109, 192, 0.2); border-style: dashed; }
.rg-tl-legend i.is-draft { background: rgba(15, 109, 192, 0.55); border-style: dashed; }
.rg-tl-legend i.is-published { background: var(--c-primary); }
.rg-tl-legend i.is-break {
  border-style: dashed;
  border-color: var(--c-muted);
  background: repeating-linear-gradient(45deg, rgba(86, 98, 112, 0.18) 0 5px, transparent 5px 10px);
}

/* あといくら使えるか(画面の下に貼り付く帯) */
.rg-dock {
  position: sticky;
  bottom: 8px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 2px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.rg-dock.tone-within {
  border-color: var(--c-success);
  background: linear-gradient(var(--c-success-soft), var(--c-success-soft)), var(--c-surface);
  color: var(--c-on-soft-success);
}

.rg-dock.tone-near {
  border-color: var(--c-warning);
  background: linear-gradient(var(--c-warning-soft), var(--c-warning-soft)), var(--c-surface);
  color: var(--c-on-soft-warning);
}

.rg-dock.tone-over {
  border-color: var(--c-danger);
  background: linear-gradient(var(--c-danger-soft), var(--c-danger-soft)), var(--c-surface);
  color: var(--c-on-soft-danger);
}

.rg-dock-main {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  min-width: 0;
}

.rg-dock-verdict {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rg-dock-figures {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rg-dock-figures small {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.85;
}

.rg-dock-bar {
  position: relative;
  flex: 0 0 140px;
  height: 10px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: var(--c-surface);
}

.rg-dock-bar > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: currentColor;
}

/* 窓(予算・申請・出力) */
.rg-modal-back {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.45);
}

.rg-modal {
  width: min(640px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--c-surface);
  box-shadow: 0 20px 40px rgba(16, 24, 40, 0.2);
}

.rg-modal.is-narrow {
  width: min(460px, 100%);
}

.rg-modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.rg-modal h3 {
  margin: 16px 0 8px;
  font-size: 16px;
}

.rg-empty {
  margin: 6px 0;
  color: var(--c-muted);
  font-size: 14px;
}

.rg-now {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.rg-now > div {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface-alt);
}

.rg-now dt {
  color: var(--c-muted);
  font-size: 12px;
}

.rg-now dd {
  margin: 2px 0;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rg-now dd.tone-within { color: var(--c-on-soft-success); }
.rg-now dd.tone-near { color: var(--c-on-soft-warning); }
.rg-now dd.tone-over { color: var(--c-on-soft-danger); }

.rg-now small {
  color: var(--c-muted);
  font-size: 11px;
}

.rg-steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.9;
}

.rg-steps strong {
  font-variant-numeric: tabular-nums;
}

.rg-suggested {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--c-accent-soft);
  color: var(--c-accent-text);
  font-size: 16px;
}

.rg-rates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-top: 8px;
}

.rg-rates label,
.rg-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--c-muted);
  font-size: 12px;
}

.rg-input {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  font-size: 14px;
}

.rg-rates .rg-input {
  width: 86px;
}

.rg-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rg-form label {
  flex: 0 1 200px;
}

.rg-form label.is-wide {
  flex: 1 1 220px;
}

.rg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.rg-summary-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.rg-summary-dl dt {
  color: var(--c-muted);
}

.rg-summary-dl dd {
  margin: 0;
  font-weight: 700;
}

.rg-note-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.rg-note-field textarea {
  min-height: 4.5em;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  resize: vertical;
}

.rg-check {
  display: block;
  margin: 12px 0;
  font-size: 14px;
}

.rg-check span {
  display: block;
  margin-top: 4px;
  color: var(--c-muted);
  font-size: 13px;
}

/* 見る用のシフト表(レジの下のタブ・キッチンの「その他」から) */
.rg-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rg-view-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rg-view-nav {
  display: flex;
  gap: 4px;
}

.rg-view-range {
  font-size: 15px;
}

/* ==========================================================================
   キッチンディスプレイ(ライト。第1弾の --kd-* と同じ色)
   ========================================================================== */

.kd {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fbfaf7;
  color: #1f2328;
  font-family: "Inter", "Roboto", -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 14px;
}

.kd :where(button) {
  font: inherit;
  color: inherit;
}

.kd-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid #e7e4de;
  background: #ffffff;
}

.kd-title {
  font-size: 17px;
  font-weight: 800;
}

.kd-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: #e3f0fc;
  color: #1b63b6;
  font-size: 12px;
  font-weight: 700;
}

.kd-more {
  margin-left: auto;
  padding: 7px 14px;
  border: 1px solid #e2dfd8;
  border-radius: 10px;
  background: #f4f3f0;
  font-size: 14px;
  font-weight: 700;
}

.kd-board {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  align-content: start;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.kd-card {
  border: 1px solid #e3e5e9;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.kd-card-head {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 2px solid #1f6fd1;
  color: #1f6fd1;
  font-weight: 800;
}

.kd-card-head small {
  color: #1470c4;
  font-weight: 700;
}

.kd-card ul {
  margin: 0;
  padding: 6px 10px 8px;
  list-style: none;
}

.kd-card li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #ebe8e2;
  font-weight: 700;
}

.kd-card li b {
  padding: 0 7px;
  border-radius: 6px;
  background: #a6470d;
  color: #ffffff;
}

.kd-panel {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 10;
  width: min(330px, calc(100% - 24px));
  padding: 12px;
  border: 1px solid #e2dfd8;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.kd-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 800;
}

.kd-panel-sec {
  margin: 10px 0 4px;
  color: #5d6672;
  font-size: 12px;
  font-weight: 700;
}

.kd-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin-bottom: 6px;
  padding: 9px 12px;
  border: 1px solid #e2dfd8;
  border-radius: 10px;
  background: #f4f3f0;
  text-align: left;
}

.kd-action b {
  font-size: 14px;
}

.kd-action small {
  color: #5d6672;
  font-size: 12px;
}

.kd-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: rgba(31, 35, 40, 0.38);
}

.kd-overlay-box {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
}

.kd-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 800;
}

.kd-close {
  padding: 6px 14px;
  border: 1px solid #e2dfd8;
  border-radius: 10px;
  background: #f4f3f0;
  font-weight: 700;
}

.kd-overlay-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* ==========================================================================
   本部ポータル(暖色のライト。本物の client/src/admin/admin.css の形)
   ========================================================================== */

.hq {
  --c-surface: #ffffff;
  --c-surface-alt: #f8f5f1;
  --c-border: #ece6e0;
  --c-text: #2b221b;
  --c-muted: #5d554c;
  --c-primary: #1470c4;
  --c-primary-soft: rgba(20, 112, 196, 0.1);
  --c-on-soft-primary: #1368b6;
  --c-gold: #a64700;
  --c-gold-soft: rgba(166, 71, 0, 0.12);
  --c-success: #15803d;
  --c-success-soft: rgba(21, 128, 61, 0.1);
  --c-on-soft-success: #137638;
  --c-danger: #d92318;
  --c-danger-soft: rgba(217, 35, 24, 0.1);
  --c-on-soft-danger: #c52016;
  --c-row-line: #ece6e0;
  position: relative;
  display: flex;
  height: 100%;
  background: radial-gradient(1200px 560px at 12% -10%, rgba(238, 128, 20, 0.022), transparent 62%), linear-gradient(170deg, #ffffff, #fefdfb 60%, #fcfaf6 100%);
  color: var(--c-text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.hq :where(button, textarea) {
  font: inherit;
  color: inherit;
}

.hq-side {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 210px;
  border-right: 1px solid var(--c-border);
  background: linear-gradient(170deg, #ffffff, #f8f4ef 88%);
  overflow: hidden;
}

.hq-side-head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--c-border);
}

.hq-side-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hq-side-sub {
  margin-top: 3px;
  color: var(--c-muted);
  font-size: 11px;
}

.hq-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  overflow: hidden;
}

.hq-nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--c-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.hq-nav button.is-active {
  background: var(--c-primary-soft);
  color: var(--c-on-soft-primary);
  box-shadow: inset 2px 0 0 var(--c-primary);
}

.hq-nav-icon {
  width: 14px;
  text-align: center;
}

.hq-nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--c-danger);
  color: #ffffff;
  font-size: 11px;
  text-align: center;
}

.hq-nav-group {
  margin: 8px 12px 2px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hq-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 40px;
}

.hq-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hq-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.hq-note {
  color: var(--c-muted);
  font-size: 12px;
}

.hq-message {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--c-success);
  border-radius: 8px;
  background: var(--c-success-soft);
  color: var(--c-on-soft-success);
  font-size: 13px;
}

.hq-card {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(90, 68, 45, 0.09);
}

.hq-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.hq-table-wrap {
  overflow-x: auto;
}

.hq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hq-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.hq-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--c-row-line);
  vertical-align: middle;
}

.hq-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hq-empty {
  padding: 22px;
  color: var(--c-muted);
  text-align: center;
}

.hq-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hq-badge.gray { background: rgba(43, 34, 27, 0.07); color: var(--c-muted); }
.hq-badge.green { background: var(--c-success-soft); color: var(--c-on-soft-success); }
.hq-badge.amber { background: var(--c-gold-soft); color: var(--c-gold); }
.hq-badge.red { background: var(--c-danger-soft); color: var(--c-on-soft-danger); }

.hq-btn {
  padding: 8px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: rgba(43, 34, 27, 0.035);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.hq-btn.small {
  padding: 5px 10px;
  font-size: 12px;
}

.hq-btn.primary {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: #ffffff;
}

.hq-btn.danger {
  border-color: var(--c-danger);
  background: var(--c-danger-soft);
  color: var(--c-on-soft-danger);
}

.hq-modal-back {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  background: rgba(43, 34, 27, 0.35);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 本物の窓(admin/ui.jsx の Modal wide)と同じく 1000px まで広げる。表は窓の中で横にスクロールする */
.hq-modal {
  width: min(1000px, 100%);
  padding: 18px 20px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.hq-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hq-modal-head h2 {
  margin: 0;
  font-size: 17px;
}

.hq-x {
  width: 30px;
  height: 30px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #ffffff;
}

/* 窓の中の見出し。シフト表 → 報告 → 人ごとの出勤 の順(本物の HqShiftApprovals.jsx と同じ大きさ) */
.hq-h3 {
  margin: 14px 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.hq-h3.is-report {
  margin: 18px 0 8px;
}

.hq-h3.is-sub {
  margin: 14px 0 6px;
  font-size: 14px;
}

.hq-lead {
  margin: 0 0 8px;
}

.hq-board {
  color: var(--c-text);
  font-family: "Inter", "Roboto", -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hq-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.hq-tile {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: #ffffff;
}

.hq-tile-label,
.hq-tile-sub {
  color: var(--c-muted);
  font-size: 12px;
}

.hq-tile-value {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-muted);
}

.hq-field textarea {
  min-height: 3.5em;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  resize: vertical;
}

.hq-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.hq-shifts summary {
  color: var(--c-primary);
  cursor: pointer;
}

.hq-shifts ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.hq-shifts li {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  gap: 6px;
  padding: 2px 0;
  font-size: 12px;
}

/* ==========================================================================
   紙(PDF)。本物は画面が canvas に描いた絵をA4横に貼る(client/src/shift/shiftTableCanvas.js)
   ========================================================================== */

.pp {
  padding: 3.2% 3.6%;
  background: #ffffff;
  color: #111111;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  box-shadow: 0 18px 40px rgba(20, 40, 70, 0.22), 0 2px 6px rgba(20, 40, 70, 0.1);
  aspect-ratio: 297 / 210;
  overflow: hidden;
  animation: sd-paper 0.8s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes sd-paper {
  from { opacity: 0; transform: translateY(-30px) rotate(-1.2deg); }
  to { opacity: 1; transform: none; }
}

.pp-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pp-title {
  font-size: clamp(14px, 2.1vw, 22px);
  font-weight: 800;
}

.pp-sub,
.pp-stamp {
  margin-top: 4px;
  color: #444444;
  font-size: clamp(10px, 1.15vw, 13px);
}

.pp-stamp {
  text-align: right;
}

.pp-table {
  width: 100%;
  margin-top: 1.4%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: clamp(9px, 1.05vw, 12px);
}

.pp-table th,
.pp-table td {
  height: 2.6em;
  padding: 2px 4px;
  border: 1px solid #222222;
  text-align: center;
  vertical-align: middle;
}

.pp-table th {
  background: #f1f1f1;
}

.pp-table .pp-name {
  width: 15%;
  text-align: left;
  font-weight: 700;
}

.pp-table .pp-pos {
  width: 9%;
}

.pp-table .pp-group td,
.pp-table .pp-group th {
  height: 1.8em;
  background: #f7f7f7;
  text-align: left;
  font-weight: 700;
}

.pp-cell b {
  display: block;
  font-weight: 800;
}

.pp-cell small {
  display: block;
  font-size: 0.86em;
}

.pp-off {
  color: #c22525;
  font-weight: 700;
}

.pp-dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.4em;
  border: 1px solid #333333;
  border-radius: 50%;
}

.pp-caption {
  margin: 10px 0 0;
  color: var(--sd-muted);
  font-size: 12.5px;
  text-align: center;
}

/* ==========================================================================
   この体験で動いた機能(白地の説明)
   ========================================================================== */

.sd-explain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.sd-explain-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.sd-explain-step {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
}

.sd-explain-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
}

.sd-explain-card p {
  flex: 1;
  margin-bottom: 14px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.85;
}

/* ==========================================================================
   幅ごとの切り替え
   ========================================================================== */

/* 画面の中が狭いとき(スマホで iPad・本部を見ている): 詰める */
@container (max-width: 760px) {
  .rg-store { font-size: 14px; }
  .rg-who { display: none; }
  .rg-logo img + img { display: none; }
  .rg-main { padding: 10px 10px 0; }
  .rg-page h2 { font-size: 18px; }
  .rg-tabs .rg-tab { padding: 8px 10px; font-size: 13px; }
  .rg-g-pay,
  .rg-g-pos { display: none; }
  .rg-g-name { width: 104px; min-width: 104px; }
  .rg-g-date { min-width: 64px; }
  .rg-nav small { display: none; }
  .rg-nav button { font-size: 9.5px; }
  .rg-now { grid-template-columns: 1fr; }
  .rg-dock-verdict { font-size: 16px; }
  .rg-dock-bar { display: none; }
  .hq-side { display: none; }
  .hq-main { padding: 14px 12px 30px; }
  .hq-table thead { display: none; }
  .hq-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
  .hq-table td { display: block; padding: 2px 4px; border: 0; }
  .hq-table .num { text-align: left; }
  .kd-board { grid-template-columns: 1fr 1fr; }
}

@container (max-width: 520px) {
  .rg-iconbtn { display: none; }
  .rg-logout { display: none; }
  .rg-nav { gap: 4px; padding: 6px; }
  .rg-nav button { min-height: 40px; }
  .rg-nav svg { width: 15px; height: 15px; }
  .rg-summary .rg-btn,
  .rg-toolbar .rg-btn { font-size: 13px; }
  .kd-board { grid-template-columns: 1fr; }
  /* スマホで iPad の画面を見るときは、下の帯を1〜2行に詰める(帯が画面の4分の1を取ってしまうため。見込み売上の行と「予算を見る」を省く) */
  .rg-dock { padding: 6px 10px; gap: 2px 8px; }
  .rg-dock-figures + .rg-dock-figures,
  .rg-dock > .rg-btn { display: none; }
  .rg-dock-verdict { font-size: 15px; }
  .rg-dock-figures { font-size: 11px; }
  .rg-page h2 { font-size: 17px; }
  .rg-switch,
  .rg-toolbar > .rg-btn { display: none; }
}

@media (max-width: 1099px) {
  .sd-step-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .sd-step-head h2,
  .sd-step-head h3 {
    font-size: 24px;
  }
  .sd-pattern-head h2 {
    font-size: 26px;
  }
  .sd-guide {
    position: relative;
    top: auto;
  }
  .sd-explain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .is-ipad .sd-screen {
    height: clamp(480px, calc(100svh - var(--sd-head) - 60px), 760px);
  }
}

@media (max-width: 640px) {
  .sd-section { padding: 24px 0 48px; }
  .sd-container { padding: 0 14px; }
  .sd-step { padding: 28px 0 40px; }
  .sd-step-head h2,
  .sd-step-head h3 { font-size: 21px; }
  .sd-patterns { grid-template-columns: minmax(0, 1fr); }
  .sd-pattern-head h2 { font-size: 23px; }
  .sd-pattern-head > p:not(.sd-pattern-no) { font-size: 14px; }
  .sd-step-lead { font-size: 14px; }
  .sd-explain { grid-template-columns: minmax(0, 1fr); }
  .is-ipad .sd-bezel { border-radius: 20px; }
  .is-ipad .sd-glass { padding: 8px; border-radius: 18px; }
  .is-ipad .sd-screen { border-radius: 10px; height: clamp(460px, calc(100svh - var(--sd-head) - 40px), 700px); }
  .is-phone .sd-screen { height: clamp(520px, calc(100svh - var(--sd-head) - 40px), 720px); }
  .sd-lock { top: 120px; }
  .sd-flow a { font-size: 12px; }
  /* その日の時間帯: 名前の列を細くして、帯の見える幅を広げる(表は横に動かせる) */
  .rg-tl-name { width: 112px; padding: 0 8px; gap: 4px; font-size: 12px; }
  .rg-tl-hours { font-size: 11px; }
  .rg-dayview-head .rg-btn { margin-left: 0; }
}

/* サイト共通のチャットの丸いボタン(右下)と「いまやること」が重ならないよう、出ている間は左に寄せた幅にしてある(.sd-pill) */
