/* ==========================================================================
   セラミィ UI（TMUI）
   確認の窓・ボトムシート・画像ビューア・トーストと、色や角の決まり。
   swal（SweetAlert2）と toastr の代わりに動く（tmui.js）。
   ========================================================================== */

:root {
  /* 色 */
  --tm-pink: #E9528E;
  --tm-pink-strong: #D63F7B;
  --tm-pink-soft: #FDEAF2;
  --tm-pink-tint: #FFF6FA;
  --tm-purple: #7D40A0;
  --tm-purple-mid: #9E6CBB;
  --tm-purple-soft: #F3E7FD;
  --tm-text: #4A4A4F;
  --tm-text-sub: #7A7A80;
  --tm-text-weak: #A6A6AC;
  --tm-line: #ECECF0;
  --tm-fill: #F4F4F7;
  --tm-white: #FFFFFF;
  --tm-danger: #E0464F;
  --tm-danger-soft: #FDEDEE;
  --tm-warn: #E09A2C;
  --tm-warn-soft: #FDF4E4;
  --tm-ok: #2E9E6B;

  /* 角・影・動き */
  --tm-radius-s: 10px;
  --tm-radius: 16px;
  --tm-radius-l: 22px;
  --tm-pill: 999px;
  --tm-shadow-1: 0 1px 2px rgba(25, 20, 35, .06), 0 2px 10px rgba(25, 20, 35, .06);
  --tm-shadow-2: 0 18px 48px rgba(30, 18, 40, .22);
  --tm-ease: cubic-bezier(.2, .8, .2, 1);
  --tm-ease-out: cubic-bezier(.16, 1, .3, 1);

  /* 下のタブの高さ（トーストの位置に使う） */
  --tm-tabbar-h: 64px;
}

/* 窓を開いている間は下のページを動かさない */
html.tmui-lock,
html.tmui-lock body {
  overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   重ね（背景）
   -------------------------------------------------------------------------- */
.tmui-layer {
  position: fixed;
  inset: 0;
  /* ページの固定の欄（コメント欄・ローディング 10000 など）より上に出す */
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 16, 32, 0);
  transition: background-color .24s ease;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: contain;
  font-family: inherit;
  box-sizing: border-box;
}
.tmui-layer *,
.tmui-layer *::before,
.tmui-layer *::after {
  box-sizing: border-box;
}
.tmui-layer.is-open {
  background: rgba(24, 16, 32, .46);
}
.tmui-layer.is-instant {
  transition: none;
}

/* --------------------------------------------------------------------------
   窓（真ん中）
   -------------------------------------------------------------------------- */
.tmui-layer .tmui-pop {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(344px, 100%);
  max-height: calc(100dvh - 40px);
  margin: 0;
  padding: 0;
  background: var(--tm-white);
  color: var(--tm-text);
  border-radius: var(--tm-radius-l);
  box-shadow: var(--tm-shadow-2);
  text-align: center;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .2s ease, transform .28s var(--tm-ease-out);
  outline: none;
  overflow: hidden;
}
.tmui-layer.is-open .tmui-pop {
  opacity: 1;
  transform: none;
}
.tmui-layer.is-closing .tmui-pop {
  opacity: 0;
  transform: scale(.97);
  transition: opacity .16s ease, transform .16s ease;
}
.tmui-layer.is-closing {
  background: rgba(24, 16, 32, 0);
  transition: background-color .2s ease;
}
.tmui-layer.is-closing.is-keep-backdrop {
  background: rgba(24, 16, 32, .46);
}

/* 幅の広い窓（フォームなど） */
.tmui-layer .tmui-pop.is-wide {
  width: min(520px, 100%);
}

/* 中身の流れる所 */
.tmui-layer .tmui-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px 22px 4px;
}
.tmui-layer .tmui-pop.has-close .tmui-scroll {
  padding-top: 34px;
}

/* 印 */
.tmui-layer .tmui-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--tm-pink-soft);
  color: var(--tm-pink);
  animation: tmui-pop-in .42s var(--tm-ease-out) both;
}
.tmui-layer .tmui-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tmui-layer .tmui-icon--success { background: var(--tm-pink-soft); color: var(--tm-pink); }
.tmui-layer .tmui-icon--error { background: var(--tm-danger-soft); color: var(--tm-danger); }
.tmui-layer .tmui-icon--warning { background: var(--tm-warn-soft); color: var(--tm-warn); }
.tmui-layer .tmui-icon--info,
.tmui-layer .tmui-icon--question { background: var(--tm-purple-soft); color: var(--tm-purple); }
.tmui-layer .tmui-icon--success .tmui-check {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: tmui-draw .42s .12s var(--tm-ease) forwards;
}

@keyframes tmui-pop-in {
  0% { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes tmui-draw {
  to { stroke-dashoffset: 0; }
}

.tmui-layer .tmui-image {
  display: block;
  max-width: 100%;
  max-height: 46vh;
  margin: 0 auto 14px;
  border-radius: var(--tm-radius);
  object-fit: contain;
}

.tmui-layer .tmui-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--tm-text);
}

.tmui-layer .tmui-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--tm-text);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.tmui-layer .tmui-body:empty {
  display: none;
}
.tmui-layer .tmui-body b,
.tmui-layer .tmui-body strong {
  font-weight: 600;
}

/* 1行の入力（swal の input） */
.tmui-layer .tmui-input {
  display: block;
  width: 100%;
  height: 48px;
  margin: 16px 0 0;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--tm-fill);
  color: var(--tm-text);
  font: inherit;
  font-size: 16px;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.tmui-layer .tmui-input:focus {
  outline: none;
  border-color: var(--tm-pink);
  background: var(--tm-white);
}

/* 入力の誤り */
.tmui-layer .tmui-validation {
  display: none;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--tm-danger-soft);
  color: var(--tm-danger);
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}
.tmui-layer .tmui-validation.is-shown {
  display: block;
  animation: tmui-shake .36s ease;
}
@keyframes tmui-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ボタンの並び */
.tmui-layer .tmui-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 20px 20px 20px;
}
.tmui-layer .tmui-actions.is-pair {
  grid-template-columns: 1fr 1fr;
}
.tmui-layer .tmui-actions:empty {
  display: none;
}
.tmui-layer .tmui-pop.no-actions .tmui-scroll {
  padding-bottom: 24px;
}

.tmui-layer .tmui-btn {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--tm-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .02em;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background-color .15s ease, filter .15s ease, opacity .15s ease;
}
.tmui-layer .tmui-btn:active {
  transform: scale(.97);
}
.tmui-layer .tmui-btn:focus-visible {
  outline: 3px solid rgba(233, 82, 142, .35);
  outline-offset: 2px;
}
.tmui-layer .tmui-btn[disabled],
.tmui-layer .tmui-btn.is-disabled {
  opacity: .5;
  pointer-events: none;
}
.tmui-layer .tmui-btn--primary {
  background: var(--tm-pink);
  color: #fff;
}
.tmui-layer .tmui-btn--primary:active {
  background: var(--tm-pink-strong);
}
.tmui-layer .tmui-btn--danger {
  background: var(--tm-danger);
  color: #fff;
}
.tmui-layer .tmui-btn--secondary {
  background: var(--tm-fill);
  color: var(--tm-text);
}
.tmui-layer .tmui-btn--outline {
  background: var(--tm-white);
  color: var(--tm-pink);
  box-shadow: inset 0 0 0 1.5px var(--tm-pink);
}
.tmui-layer .tmui-btn--danger-outline {
  background: var(--tm-white);
  color: var(--tm-danger);
  box-shadow: inset 0 0 0 1.5px var(--tm-danger);
}
.tmui-layer .tmui-btn--ghost {
  min-height: 40px;
  background: transparent;
  color: var(--tm-text-sub);
  font-weight: 500;
}

/* 待っている間の回る印 */
.tmui-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.2px solid currentColor;
  border-right-color: transparent;
  animation: tmui-spin .7s linear infinite;
  flex: 0 0 auto;
}
@keyframes tmui-spin {
  to { transform: rotate(360deg); }
}
.tmui-btn.is-loading .tmui-btn-label {
  opacity: .85;
}

/* 閉じる */
.tmui-layer .tmui-close {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tm-fill);
  color: var(--tm-text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background-color .15s ease;
}
.tmui-layer .tmui-close:active {
  transform: scale(.92);
}
.tmui-layer .tmui-close:focus-visible {
  outline: 3px solid rgba(233, 82, 142, .35);
  outline-offset: 2px;
}
.tmui-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
}

.tmui-layer .tmui-footer {
  flex: 0 0 auto;
  margin: 0 20px;
  padding: 12px 0 16px;
  border-top: 1px solid var(--tm-line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--tm-text-sub);
}
.tmui-layer .tmui-footer:empty {
  display: none;
}

.tmui-layer .tmui-timer {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--tm-pink);
  transform-origin: left center;
  opacity: .7;
}

/* --------------------------------------------------------------------------
   ボトムシート（スマホでフォームや長い中身を出すとき）
   -------------------------------------------------------------------------- */
.tmui-layer--sheet {
  align-items: flex-end;
  padding: 0;
}
.tmui-layer--sheet .tmui-pop {
  width: min(560px, 100%);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px));
  border-radius: var(--tm-radius-l) var(--tm-radius-l) 0 0;
  margin-bottom: var(--tmui-kb, 0px);
  opacity: 1;
  transform: translateY(105%);
  transition: transform .34s var(--tm-ease-out);
  box-shadow: 0 -10px 40px rgba(30, 18, 40, .18);
}
.tmui-layer--sheet.is-open .tmui-pop {
  transform: translateY(var(--tmui-drag, 0px));
}
.tmui-layer--sheet.is-dragging .tmui-pop {
  transition: none;
}
/* キーボードが出ているとき：窓を見えている所の高さに収め、ボタンの段を詰める */
.tmui-layer--sheet.has-kb .tmui-pop {
  max-height: calc(var(--tmui-vv-h, 100dvh) - 8px);
}
.tmui-layer--sheet.has-kb .tmui-actions {
  padding-top: 8px;
  padding-bottom: 8px;
}
.tmui-layer--sheet.has-kb .tmui-btn {
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.tmui-layer--sheet.is-closing .tmui-pop {
  opacity: 1;
  transform: translateY(105%);
  transition: transform .22s ease-in;
}
.tmui-layer .tmui-handle {
  flex: 0 0 auto;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}
.tmui-layer .tmui-handle::before {
  content: "";
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: #DCDCE2;
}
.tmui-layer--sheet .tmui-scroll {
  padding: 8px 20px 4px;
}
.tmui-layer--sheet .tmui-pop.has-close .tmui-scroll {
  padding-top: 18px;
}
.tmui-layer--sheet .tmui-close {
  top: 12px;
  right: 14px;
}
.tmui-layer--sheet .tmui-actions {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -1px 0 var(--tm-line);
}
.tmui-layer--sheet .tmui-pop.is-scroll-end .tmui-actions,
.tmui-layer--sheet .tmui-pop.is-no-scroll .tmui-actions {
  box-shadow: none;
}
.tmui-layer--sheet .tmui-pop.no-actions .tmui-scroll {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.tmui-layer--sheet .tmui-footer {
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

/* --------------------------------------------------------------------------
   画像ビューア（暗い背景）
   -------------------------------------------------------------------------- */
.tmui-layer--viewer {
  padding: 0;
}
.tmui-layer--viewer.is-open {
  background: rgba(8, 6, 10, .94);
}
.tmui-layer--viewer .tmui-pop {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #fff;
  transform: scale(.98);
}
.tmui-layer--viewer .tmui-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  overflow: hidden;
}
.tmui-layer--viewer .tmui-image {
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0;
  animation: tmui-fade-in .2s ease both;
}
.tmui-layer--viewer .tmui-body {
  color: #fff;
}
.tmui-layer--viewer .tmui-close {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@keyframes tmui-fade-in {
  from { opacity: .3; }
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   トースト
   -------------------------------------------------------------------------- */
.tmui-toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tm-tabbar-h) + 14px + env(safe-area-inset-bottom, 0px));
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}
.tmui-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 11px 18px 11px 12px;
  border-radius: 16px;
  background: rgba(38, 32, 44, .95);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: .01em;
  box-shadow: 0 10px 30px rgba(20, 10, 30, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  white-space: pre-line;
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .2s ease, transform .3s var(--tm-ease-out);
}
.tmui-toast.is-shown {
  opacity: 1;
  transform: none;
}
.tmui-toast.is-hiding {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.tmui-toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tm-pink);
  color: #fff;
}
.tmui-toast-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tmui-toast--error .tmui-toast-icon { background: var(--tm-danger); }
.tmui-toast--warning .tmui-toast-icon { background: var(--tm-warn); }
.tmui-toast--info .tmui-toast-icon { background: var(--tm-purple-mid); }

/* PC では下のタブが無いので、下から少しだけ離す */
@media (min-width: 1024px) {
  .tmui-toasts {
    bottom: 32px;
  }
}

/* --------------------------------------------------------------------------
   新しい部品：アクションシートの並び（TMUI.actionSheet）
   -------------------------------------------------------------------------- */
.tmui-sheet-title {
  align-self: stretch;
  margin: 2px 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--tm-text);
  text-align: center;
}
.tmui-sheet-desc {
  align-self: stretch;
  margin: -4px 0 14px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--tm-text-sub);
  text-align: center;
}
.tmui-list {
  align-self: stretch;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  border-radius: var(--tm-radius);
  background: var(--tm-fill);
  overflow: hidden;
}
.tmui-list-item {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--tm-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease;
}
.tmui-list-item + .tmui-list-item {
  box-shadow: inset 0 1px 0 var(--tm-line);
}
.tmui-list-item:active {
  background: #EAEAEF;
}
.tmui-list-item.is-danger {
  color: var(--tm-danger);
}
.tmui-list-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--tm-text-sub);
}
.tmui-list-item.is-danger svg {
  color: var(--tm-danger);
}

/* --------------------------------------------------------------------------
   一度だけの案内（TMUI.tip）
   -------------------------------------------------------------------------- */
.tmui-tip {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.tmui-tip-image {
  display: block;
  width: 100%;
  max-width: 320px;
  max-height: 38vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--tm-line);
}
.tmui-tip-figure {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tmui-tip-caption {
  font-size: 12px;
  color: var(--tm-text-weak);
}
.tmui-tip-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--tm-text);
}
.tmui-tip-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--tm-text);
}
.tmui-tip-note {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--tm-pink-tint);
  color: var(--tm-text-sub);
  font-size: 13px;
  line-height: 1.7;
}
.tmui-checklist {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: 14px;
  background: var(--tm-fill);
  text-align: left;
}
.tmui-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--tm-text);
}
.tmui-checklist svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 0;
  padding: 3px;
  border-radius: 50%;
  background: var(--tm-pink);
  color: #fff;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 動きを減らす設定の人 */
@media (prefers-reduced-motion: reduce) {
  .tmui-layer,
  .tmui-pop,
  .tmui-toast,
  .tmui-icon,
  .tmui-layer--sheet .tmui-pop {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ===== 写真のビューア（TMUI.gallery） ===== */
html.tmg-lock, html.tmg-lock body { overflow: hidden !important; }
.tmg {
  position: fixed; inset: 0; z-index: 10060;
  background: transparent;
  opacity: 0; transition: opacity .18s ease;
  touch-action: pan-x pan-y;
}
.tmg::before { content: ''; position: absolute; inset: 0; background: #0b0a0f; opacity: var(--tmg-fade, 1); }
.tmg.is-open { opacity: 1; }
.tmg.is-closing { opacity: 0; }
.tmg-bar {
  position: absolute; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 6px;
  background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0));
  color: #fff;
}
.tmg-count { text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; opacity: .9; }
.tmg-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; cursor: pointer;
}
.tmg-btn:active { background: rgba(255,255,255,.15); }
.tmg-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tmg-track {
  position: absolute; inset: 0;
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  transform: translateY(var(--tmg-drag, 0px));
  transition: transform .18s ease;
}
.tmg-track::-webkit-scrollbar { display: none; }
.tmg-track.is-zoomed { overflow-x: hidden; }
.tmg-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.tmg-zoom {
  width: 100%; height: 100%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.tmg-zoom.is-zoomed { overflow: auto; display: block; }
.tmg-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.tmg-zoom.is-zoomed .tmg-img { max-width: none; max-height: none; width: 220%; height: auto; }

/* コースの時間を入れる欄（TMUI.durationField） */
.tmui-dur { text-align: left; }
.tmui-dur__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tmui-dur .tmui-dur__input { width: 7.5em; max-width: 50%; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tmui-dur__unit { color: #4A4A4F; font-size: 14px; }
.tmui-dur__hint { flex-basis: 100%; min-height: 1.4em; color: #7A7A80; font-size: 12px; line-height: 1.4; }
.tmui-dur__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tmui-dur__chip {
  padding: 6px 12px;
  border: 1px solid #ECECF0;
  border-radius: 999px;
  background: #fff;
  color: #4A4A4F;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.tmui-dur__chip.is-on { border-color: #7D40A0; background: #7D40A0; color: #fff; }
