:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #f7df1eaa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}
* {
  -webkit-tap-highlight-color: transparent;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modal-animate {
  animation: fadeIn 0.2s ease-out forwards;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* クイックガイドのアニメーション用クラス */
.guide-transition {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.guide-hidden {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  pointer-events: none;
}

/* ブラウザ標準の上下矢印を非表示にするための「追加」コード */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none; /* ★これを追加 */
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield; /* Firefox用 */
  appearance: none;
}
/* ツールチップの表示アニメーションを微調整 */
div[class*="absolute bottom-full"] {
  transform: translateX(-50%) translateY(8px); /* 最初は少し下に下げておく */
}

.group:hover div[class*="absolute bottom-full"] {
  transform: translateX(-50%) translateY(0); /* ホバー時にスッと浮き上がる */
}
.custom-sub-item:has(div[id^="edit-menu-"]:not(.hidden)) {
  z-index: 100 !important;
  position: relative;
}
/* --- スマホでのガタつき解消と整列 --- */

.sub-item {
  display: flex !important;
  align-items: center !important;
  /* 左右の両端に振り分ける */
  justify-content: space-between !important;
  min-height: 72px; /* 少し高さを出すと操作性が上がります */
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* サービス名エリア：長い名前でも金額を押し出さない */
.sub-item > div:first-child {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

/* サービス名テキストの折り返し制御 */
.sub-item label {
  flex: 1;
  min-width: 0;
  margin-right: 8px;
}

/* 金額表示エリアの固定 */
/* style.css の末尾付近 */

.sub-item > div:last-child {
  /* 固定幅を少し小さくして、右側に余白(margin-right)を作る */
  width: 130px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  /* 右端にピッタリくっつけず、少し隙間を開ける */
  margin-right: 8px;
  margin-left: 8px;
}

/* セレクトボックス自体の横幅を親(130px)に強制的に合わせる */
.plan-selector {
  width: 100% !important;
  max-width: 130px !important;
  box-sizing: border-box !important;
}

/* チェックボックスの固定 */
.sub-checkbox {
  flex-shrink: 0;
}
