/* 画面いっぱいに広げ、余白部分も当たり判定にする。
   箱が中身の大きさしか無いと、シートの外を押しても閉じられない。 */
.dialog--sheet {
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--content-max);
  max-height: 88dvh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--color-surface-overlay);
  box-shadow: var(--elevation-overlay);
  padding-bottom: var(--safe-bottom);
  /* 掴んで動かす対象。指を離したときだけ滑らかに戻す */
  transition: translate var(--duration-slow) var(--ease-out);
}

.sheet.is-dragging {
  transition: none;
}

.sheet__head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-12) var(--space-3);
  flex-shrink: 0;
  /* 掴む範囲。縦スクロールと競合させない */
  touch-action: none;
  cursor: grab;
}

.sheet__head:active {
  cursor: grabbing;
}

.sheet__grabber {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-border-strong);
}

.sheet__title {
  font-size: var(--text-title);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  text-align: center;
}

.sheet__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
}

.sheet__body {
  padding: var(--space-2) var(--space-4) var(--space-6);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet--action .sheet__head { padding-inline:56px; }
.sheet__action { position:absolute; left:8px; top:8px; color:inherit; }
.sheet__action .btn { color:inherit; }
.guide-help-error { padding:12px; border-radius:10px; background:var(--color-negative-subtle); color:var(--color-negative); font-size:13px; line-height:1.7; }
