/*



















 */
*, *::before, *::after {
  box-sizing: border-box;
}
:root {
  /* Brand */
  --brand: #117BBF;

  /* Layout */
  --bottom-nav-height: 75px;
  --header-height: 70px;
  --container-max: 960px;

  /* Background / Surface */
  --bg: #ffffff;
  --surface: #f7fafc;        /* カード背景 */
  --surface-2: #f1f5f9;      /* 薄いセクション背景 */

  /* Text */
  --text: #111827;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  /* Border / Shadow */
  --border: #e5e7eb;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  /* Spacing */
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               "Noto Sans JP", sans-serif;
  --font-size-base: 15px;
  --line-height: 1.6;

  /* State colors */
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  /* Brand variations (便利) */
  --brand-weak: #e8f3fb;
  --brand-hover: #0e6aa5;
}
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-4));
}

html, body {
  overflow-x: hidden;
}

@supports not (overflow-x: clip) {
  html, body {
    overflow-x: hidden;
  }
}
/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 16px 32px;
  font-size: 18px;
  border-radius: 14px;
  font-weight: 600;

  border: none;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;

  transition:
    transform 0.18s cubic-bezier(0.17, 0.67, 0.37, 1.32),
    box-shadow 0.18s ease,
    background-color 0.18s ease;

  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.10),
    0 2px 4px rgba(255, 255, 255, 0.8) inset;

  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 10px 20px rgba(0,0,0,0.15),
    0 3px 6px rgba(255,255,255,0.85) inset;
}

.btn:active {
  transform: translateY(1px) scale(0.95);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.25) inset,
    0 0 0 rgba(0,0,0,0.1);
}

/* Variants */
.btn--primary {
  background: linear-gradient(180deg, #1ea0ff, #117BBF);
  color: #fff;
}

.btn--secondary {
  background: linear-gradient(180deg, #d6d8d8a3, #e9e9e9);
  color: #333;
}

/* ログアウト用に */
.btn--danger {
  background: linear-gradient(180deg, #e93232, #ef4444);
  color: #fff;
}


/* トグル全体 */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  background-color: #d0d7de;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease, transform 0.12s ease;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.12) inset,
    0 0 0 1px rgba(0,0,0,0.06);
}

/* ON状態 */
.toggle-switch.is-on {
  background-color: rgb(247, 130, 87);
}

/* 白い丸（つまみ） */
.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.18),
    0 1px 2px rgba(0,0,0,0.10);
}

/* ON時に右へスライド */
.toggle-switch.is-on .toggle-knob {
  transform: translateX(20px);
}

.habit-item__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  margin-left: auto;
}
.toggle-switch:active {
  transform: scale(0.96);
}

.toggle-switch:active .toggle-knob {
  width: 26px; /* ちょい潰れる感じ */
}

/* キーボード操作のフォーカスリング（アクセシビリティ） */
.toggle-switch:focus-visible {
  outline: 3px solid rgba(17, 123, 191, 0.35); /* #117BBF を薄く */
  outline-offset: 3px;
}

.habit-item__actions form {
  margin-left: auto;
}

/* 習慣記録アニメーション */

/* トグル成功時のアニメーション */
.toggle-switch.toggle-success {
  animation: toggle-pulse 0.5s ease-out;
}

@keyframes toggle-pulse {
  0% {
    transform: scale(1);
    box-shadow:
      0 1px 2px rgba(0,0,0,0.12) inset,
      0 0 0 1px rgba(0,0,0,0.06);
  }
  30% {
    transform: scale(1.15);
    box-shadow:
      0 1px 2px rgba(0,0,0,0.12) inset,
      0 0 0 1px rgba(0,0,0,0.06),
      0 0 20px rgba(247, 130, 87, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 1px 2px rgba(0,0,0,0.12) inset,
      0 0 0 1px rgba(0,0,0,0.06);
  }
}

/* パーティクル（紙吹雪）エフェクト */
.habit-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: particle-burst 0.7s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--tx, 0px)),
      calc(-50% + var(--ty, 0px))
    ) scale(0);
  }
}

/* チェックマークアニメーション */
.habit-checkmark {
  position: absolute;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 101;
  animation: checkmark-pop 0.8s ease-out forwards;
}

.habit-checkmark svg {
  width: 100%;
  height: 100%;
  color: #117BBF;
  filter: drop-shadow(0 2px 8px rgba(17, 123, 191, 0.5));
}

@keyframes checkmark-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(-45deg);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 20px)) scale(1.2) rotate(0deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 25px)) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 35px)) scale(0.8) rotate(0deg);
  }
}

/* 習慣カードにposition:relativeを確保（パーティクル用） */
.habit-item {
  position: relative;
  overflow: visible;
}
/* Header */
.app-header {
  overflow-x: clip;
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

@supports not (overflow-x: clip) {
  .app-header {
    overflow-x: hidden;
  }
}

.app-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 6px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.app-header__left {
  justify-self: start;
  width: auto;
}

.app-header__center {
  justify-self: center;
}

.app-header__logo-link {
  display: inline-block;
}

.app-header__logo {
  height: 40px;
  width: auto;
  display: block;
}

/* ハンバーガーボタン（右上固定） */
.app-header__menu-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 60;

  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;

  /* ここ重要：内部の線をabsoluteで重ねられるようにする */
  position: absolute;
}

.app-header__menu-button {
  /* 見た目のクリック領域を安定させる（任意だけどおすすめ） */
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;
}

/* 3本線の共通 */
.app-header__menu-line {
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background-color: #117BBF;

  /* ここ重要：回転時に中心がブレないよう基準を固定 */
  transform-origin: 50% 50%;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

/* 閉じてる時は普通に縦並びっぽく配置（gridで3本作る） */
.app-header__menu-button {
  grid-auto-rows: min-content;
  row-gap: 8px;
}

.app-header__menu-button .app-header__menu-line:nth-child(1),
.app-header__menu-button .app-header__menu-line:nth-child(2),
.app-header__menu-button .app-header__menu-line:nth-child(3) {
  position: relative;
}

/* 開いたとき：3本を中央に重ねる → 1本目と3本目だけ回転 */
.app-header.is-menu-open .app-header__menu-button {
  row-gap: 0; /* gapの影響を消す */
}

.app-header.is-menu-open .app-header__menu-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 1本目：＼ */
.app-header.is-menu-open .app-header__menu-line:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

/* 2本目：消す */
.app-header.is-menu-open .app-header__menu-line:nth-child(2) {
  opacity: 0;
}

/* 3本目：／ */
.app-header.is-menu-open .app-header__menu-line:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}


/* ドロワーメニュー本体（右からスライド） */
.app-header__nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;

  width: 70%;
  max-width: 320px;

  background: #fff;
  border-radius: 16px 0 0 16px; /* 右端は画面に接するので0に */
  padding: 12px;

  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
  z-index: 55;

  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.app-header.is-menu-open .app-header__nav {
  transform: translateX(0);
}

/* メニューの中身 */
.app-header__nav-list {
  margin: 64px 16px 16px;
  padding: 12px 8px 16px;
  list-style: none;
}

.app-header__nav-list li + li {
  margin-top: 12px;
}

/* メニューリンク（menu__link運用） */
.menu__link {
  position: relative;
  display: block;

  padding: 16px 20px;
  border-radius: 12px;

  text-decoration: none;
  color: var(--text, #333);

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;

  transition: background-color 0.2s ease;
}

.menu__link:hover {
  background-color: rgba(17, 123, 191, 0.08);
}

.menu__link::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 10px;
  width: 0;
  height: 2px;
  background-color: var(--primary, #117BBF);
  transition: width 0.25s ease;
}

.menu__link:hover::after {
  width: calc(100% - 40px);
}
/* ===============================
   Footer
   =============================== */

.app-footer {
  background: #ffffff;
  padding: 20px 0;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  margin-top: 40px;
  margin-bottom: 16px;
  color: #333;
  font-size: 14px;
  border-top: 1px solid #e5e5e5;
}

.app-footer__inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* コピーライト */
.app-footer__copy {
  text-align: left;
  flex: 1;
}

/* 右側リンク */
.app-footer__links {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}


.app-footer__links a {
  color: #333;
  text-decoration: none;
}

.app-footer__links a:hover {
  text-decoration: underline;
}

/* Footer: responsive */

@media (max-width: 600px) {
  .app-footer {
    padding: 16px 0;
    padding-bottom: calc(var(--bottom-nav-height) + 12px);
    margin-top: 24px;
  }

  .app-footer__inner {
    padding: 0 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .app-footer__copy {
    text-align: left;
    flex: none;
    font-size: 13px;
  }

  .app-footer__links {
    gap: 12px;
    flex-wrap: wrap;
  }

  .app-footer__links a {
    font-size: 13px;
  }
}
:root{
  --haby-primary: #117BBF;
  --haby-primary-soft: rgba(17,123,191,0.10);
  --haby-border: rgba(0,0,0,0.08);
  --haby-text: rgba(0,0,0,0.86);
  --haby-muted: rgba(0,0,0,0.45);

  /* 実施状況色分け */
  --cal-all: rgb(238, 178, 156);
  --cal-all-border: rgb(244, 146, 111);
  --cal-partial: rgb(243, 222, 216);
  --cal-partial-border: rgb(241, 196, 179);
  --cal-none: rgba(0,0,0,0.03);
  --cal-none-border: rgba(0,0,0,0.08);
}

/* 外枠 */
.simple-calendar.haby-cal{
  background:#fff;
  border:1px solid rgba(17,123,191,0.14);
  border-radius:18px;
  padding:24px;
  max-width: 100%;
  overflow-x: hidden;
  box-shadow:
    0 10px 28px rgba(0,0,0,0.06),
    0 1px 0 rgba(255,255,255,0.6) inset;
}

/* header */
.haby-cal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.haby-cal__title{
  position: relative;
  padding-left: 12px;
  font-size:20px;
  font-weight:900;
  color:var(--haby-text);
  letter-spacing:.2px;
  white-space: nowrap;
}

.haby-cal__title::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform: translateY(-50%);
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: var(--haby-primary);
  opacity: 0.9;
}

/* nav buttons */
.haby-cal__nav{ display:flex; gap:8px; }

.haby-cal__nav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(17,123,191,0.18);
  background: rgba(17,123,191,0.04);
  text-decoration:none;
  color:var(--haby-text);
  font-weight:800;
  font-size:13px;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.04),
    0 1px 0 rgba(255,255,255,0.65) inset;
}

.haby-cal__nav-btn:hover{
  border-color: rgba(17,123,191,0.26);
}

.haby-cal__nav-btn:active{
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.03),
    0 1px 0 rgba(255,255,255,0.55) inset;
}

.haby-cal__nav-btn--ghost{
  background:#fff;
  border-color:rgba(0,0,0,0.06);
}

/* legend */
.haby-cal__legend{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin: 0 0 10px;
}

.haby-cal__legend-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:800;
  color: var(--haby-muted);
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid rgba(0,0,0,0.06);
  background:#fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.haby-cal__legend-item::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(0,0,0,0.14);
}

.haby-cal__legend-item--all::before{ background: rgb(247, 130, 87); }
.haby-cal__legend-item--partial::before{ background: rgb(243, 222, 216); }
.haby-cal__legend-item--none::before{ background: rgba(0,0,0,0.28); }

/* table */
.haby-cal__table{
  width:100%;
  max-width: 100%;
  border-collapse:separate;
  border-spacing:8px;
  table-layout: fixed;
}

.haby-cal__weekday{
  text-align:center;
  font-size:13px;
  font-weight:800;
  color:var(--haby-muted);
  padding:6px 0;
  border-radius: 12px;
}

/* cells */
.haby-cal__cell{
  position: relative;
  border-radius: 16px;
  border:2px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.01);
  vertical-align:top;
  padding:0;
  height: 116px;
  overflow:hidden;
  box-sizing: border-box;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
  will-change: transform;
}

.haby-cal__cell-inner{
  height:100%;
  display:flex;
  flex-direction:column;
  padding:10px;
  background: transparent;
  min-height: 48px;
}

.haby-cal__date{
  font-size:13px;
  font-weight:900;
  color:var(--haby-text);
  line-height: 1.1;
}

.haby-cal__content{
  margin-top:6px;
  font-size:12px;
  line-height:1.25;
  color: var(--haby-text);
  overflow:hidden;
}

.simple-calendar .not-current-month.haby-cal__cell{
  opacity:.35;
}

.haby-cal__cell:active{
  transform: scale(0.98);
}

/* 実施状況 */
.haby-cal__cell.cal-day--all{
  background: var(--cal-all);
  border-color: var(--cal-all-border);
}

.haby-cal__cell.cal-day--partial{
  background: var(--cal-partial);
  border-color: var(--cal-partial-border);
}

.haby-cal__cell.cal-day--none{
  background: var(--cal-none);
  border-color: var(--cal-none-border);
}

.haby-cal__complete{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: rgb(238, 108, 15);
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* cell link */
.haby-cal__cell-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.haby-cal__cell-link:hover .haby-cal__cell-inner {
  background: rgba(17, 123, 191, 0.08);
  border-radius: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 700px){
  .simple-calendar.haby-cal{
    padding: 12px;
    border-radius: 16px;
  }

  .haby-cal__title{
    font-size: 16px;
  }

  .haby-cal__nav{ gap: 6px; }

  .haby-cal__nav-btn{
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
  }

  .haby-cal__legend{ gap: 6px; }

  .haby-cal__legend-item{
    font-size: 11px;
    padding: 6px 8px;
  }

  .haby-cal__table{
    border-spacing: 6px;
  }

  .haby-cal__weekdays{
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }

  .haby-cal__weekday{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 6px 0;
    border-radius: 10px;
    background: rgba(0,0,0,0.02);
  }

  .haby-cal__body{
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }

  .haby-cal__row{
    display: contents;
  }

  .haby-cal__cell{
    height: 48px;
    border-radius: 14px;
  }

  .haby-cal__cell-inner{
    padding: 8px;
  }

  .haby-cal__date{
    font-size: 12px;
    line-height: 1;
  }

  .haby-cal__content,
  .haby-cal__complete{
    display: none;
  }
}

@media (max-width: 480px) {
  .haby-cal__cell-inner {
    min-height: 56px;
  }
}

@media (hover: hover) and (pointer: fine){
  .haby-cal__cell:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.07);
    border-color: rgba(17,123,191,0.22);
  }
}
/* Bottom Navigation */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  /* height: var(--bottom-nav-height); */
  height: var(--bottom-nav-height);

  padding: 10px 24px 18px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);

  display: flex;
  justify-content: space-between;
  align-items: center;

  z-index: 40;
}


.bottom-nav__item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

.bottom-nav__icon-wrapper {
  margin: 10px 0 6px;
}

.bottom-nav__icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}


/* アクティブ */
.bottom-nav__item--active {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 768px) {
  .bottom-nav {
    justify-content: center;
    gap: 35px;
  }

  .bottom-nav__item {
    flex: 0 0 auto;
  }
}
/* flash */
.flash {
  max-width: 640px;
  margin: 12px auto;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.4;
}

.flash__message {
  margin: 0;
  font-weight: 700;
}

/* success: 緑 */
.flash--success {
  background: #eaf7ef;
  border-color: #bfe6cc;
  color: #1f6b3a;
}

/* danger: 赤 */
.flash--danger {
  background: #fdecec;
  border-color: #f5bcbc;
  color: #9b1c1c;
}

/* info */
.flash--info {
  background: #eef5ff;
  border-color: #c4dcff;
  color: #124a9a;
}

/* form errors block */
.form-errors {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  background: #fdecec;
  border: 1px solid #f5bcbc;
  color: #9b1c1c;
}

.form-errors__title {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 14px;
}

.form-errors__list {
  margin: 0;
  padding-left: 18px;
}

.form-errors__item {
  font-size: 13px;
  font-weight: 700;
}

/* rails default wrapper */
.field_with_errors .habit-form__input,
.field_with_errors input,
.field_with_errors textarea,
.field_with_errors select {
  border-color: #f5bcbc !important;
  background: #fff7f7;
}
/* Top Page */
.top-wrapper {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px;
  text-align: center;
  box-sizing: border-box;
}


/* タイトル */
.app-title {
  margin: 0 0 12px;
  font-weight: 900;
  color: #117BBF;
  letter-spacing: 0.2px;
  font-size: clamp(36px, 7vw, 56px);
}

/* ヒーローボタン */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

/* CTA セクション */
.cta {
  width: min(92vw, 720px);
  text-align: center;
  margin: 44px auto 0;
  padding: 22px 16px;
  background: linear-gradient(180deg, #e9f5ff, #f6fbff);
  border-radius: 20px;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.06),
    0 2px 4px rgba(255, 255, 255, 0.9) inset;
}

.cta h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 900;
  color: #117BBF;
  text-shadow: 0 1px 2px rgba(17, 123, 191, 0.12);
}

/* 機能紹介セクション */
.features {
  width: min(92vw, 720px);
  margin: 44px auto 0;
  padding: 0 0;
  text-align: center;
}

.features h2 {
  margin: 0 0 18px;
  font-size: clamp(18px, 4.5vw, 26px);
  font-weight: 900;
  color: #117BBF;
  text-shadow: 0 1px 2px rgba(17, 123, 191, 0.12);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.feature-list li {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.06),
    0 2px 3px rgba(255, 255, 255, 0.6) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-list li:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 35px rgba(15, 23, 42, 0.10),
    0 3px 5px rgba(255,255,255,0.65) inset;
}

.feature-list h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
  color: #117BBF;
}

.feature-list p {
  margin: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

/* スマホ最適化 */
@media (max-width: 480px) {
  .top-wrapper {
    padding: 24px 14px;
  }

  .hero-buttons a {
    width: 100%;
    min-width: 0;
  }

  .cta {
    margin-top: 32px;
  }

  .features {
    margin-top: 32px;
  }
}
/* 認証画面 共通レイアウト */

.devise-main {
  padding: 20px;
}

/* 外側：中央寄せ */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px;
  width: 100%;
  box-sizing: border-box;
}

/* カード */
.auth-card {
  width: min(92vw, 520px);
  background: #fff;
  padding: 28px 20px;
  border-radius: 16px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(17, 123, 191, 0.08);
}

/* タイトル */
.auth-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #117BBF;
}

/* フォームのパーツ */
.auth-card .field {
  margin-bottom: 16px;
}

.auth-card label {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #555;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #d0d7de;
  box-sizing: border-box;
}

.auth-card input:focus {
  outline: none;
  border-color: #117BBF;
  box-shadow: 0 0 0 2px rgba(17, 123, 191, 0.15);
}

/* ボタン */
.auth-button {
  width: 100%;
  border: none;
  padding: 12px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: #117BBF;
  color: #fff;
  cursor: pointer;
}

.auth-button:hover {
  opacity: 0.9;
}

.auth-card .actions {
  margin-top: 16px;
}

/* links */
.auth-card a {
  color: #117BBF;
  font-size: 13px;
}

/* メモの小さい文字 */
.field-note {
  font-size: 12px;
  color: #6b7280;
  margin: 4px 0 6px;
}

/* remember_me */
.field-remember {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.auth-links__text {
  margin: 0 0 8px;
  font-size: 14px;
  color: #64748b;
}

.auth-links__signup {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #117BBF;
  background: #f0f7fc;
  border: 1px solid rgba(17, 123, 191, 0.2);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.auth-links__signup:hover {
  background: #e0f0fa;
  border-color: rgba(17, 123, 191, 0.3);
}

.auth-links a {
  display: inline-block;
  margin: 4px 0;
}

/* エラーメッセージ */
.error_explanation {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.error_explanation h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #b91c1c;
}

.error_explanation ul {
  margin: 0;
  padding-left: 18px;
}

.error_explanation li {
  font-size: 13px;
  color: #b91c1c;
}

/* スマホ微調整 */
@media (max-width: 480px) {
  .auth-wrapper {
    padding: 24px 12px;
  }

  .auth-card {
    padding: 24px 16px;
  }

  .auth-title {
    font-size: 20px;
    margin-bottom: 16px;
  }
}
/* マイページ全体 */
.account-page {
  width: min(92vw, 640px);
  margin: 24px auto;
  padding: 24px 16px;
  background: #ffffff;
  border-radius: 20px;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.06),
    0 2px 4px rgba(255, 255, 255, 0.7) inset;
}


.account-page__title {
  font-size: 24px;
  font-weight: 700;
  color: #117bbf;
  text-align: center;
  margin-bottom: 12px;
}

.account-page__user {
  text-align: center;
  color: #555;
  font-size: 14px;
  margin-bottom: 24px;
}

.account-page__user-name {
  color: #117bbf;
}

/* メニューリスト */
.account-menu {
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.account-menu__item {
  margin-bottom: 12px;
}

/* メニューリンク */
.account-menu__link {
  display: block;
  width: 100%;
  max-width: 420px;
  text-align: center;

  padding: 14px 16px;
  border-radius: 14px;
  background: #f5fbff;
  color: #117bbf;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin: 0 auto;

  position: relative;
  padding-left: 20px;

  box-shadow:
    0 4px 10px rgba(17, 123, 191, 0.08),
    0 0 0 1px rgba(17, 123, 191, 0.03);
  transition:
    background 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}


/* ホバー・フォーカス時の動き */
.account-menu__link:hover,
.account-menu__link:focus {
  background: #e3f2ff;
  transform: translateY(-1px);
  box-shadow:
    0 8px 18px rgba(17, 123, 191, 0.12),
    0 0 0 1px rgba(17, 123, 191, 0.06);
}

/* 危険アクション（削除）だけ色を変える */
.account-menu__item--danger .account-menu__link {
  background: #fff5f5;
  color: #d9534f;
  box-shadow:
    0 4px 10px rgba(217, 83, 79, 0.06),
    0 0 0 1px rgba(217, 83, 79, 0.04);
}

.account-menu__link--danger:hover,
.account-menu__link--danger:focus {
  background: #ffe4e4;
  box-shadow:
    0 8px 18px rgba(217, 83, 79, 0.14),
    0 0 0 1px rgba(217, 83, 79, 0.08);
}

/* 小さい画面でも余白を保つ */
@media (max-width: 480px) {
  .account-page {
    margin: 24px 12px 56px;
    padding: 20px 16px 24px;
  }

  .account-page__title {
    font-size: 20px;
  }

  .account-menu__link {
    font-size: 14px;
    padding: 12px 14px;
  }
}
/* メールアドレス変更ページ */
.account-form-page {
  max-width: 480px;
  margin: 40px auto 80px;
  padding: 0 16px;
}

.account-form-page__title {
  font-size: 22px;
  font-weight: 700;
  color: #117bbf;
  text-align: center;
  margin-bottom: 16px;
}

/* カード部分 */
.account-form-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 20px 28px;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.06),
    0 2px 4px rgba(255, 255, 255, 0.7) inset;
}

/* フィールド */
.account-form__field {
  margin-bottom: 18px;
}

.account-form__label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.account-form__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d0e3f3;
  font-size: 14px;
  outline: none;
  background: #f8fcff;
  min-height: 44px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.account-form__input:focus {
  border-color: #117bbf;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(17, 123, 191, 0.18);
}

/* 説明テキスト */
.account-form__help-text {
  margin-top: 6px;
  font-size: 12px;
  color: #777;
}

/* ボタン */
.account-form__actions {
  margin-top: 24px;
  text-align: center;
}

.account-form__submit {
  display: inline-block;
  min-width: 220px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #117bbf, #6aacb0);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 123, 191, 0.3);
  transition:
    transform 0.1s ease,
    box-shadow 0.2s ease,
    opacity 0.15s ease;
}

.account-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 123, 191, 0.35);
  opacity: 0.95;
}

.account-form__submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(17, 123, 191, 0.25);
}

/* 戻るリンク */
.account-form-page__back {
  margin-top: 16px;
  text-align: center;
}

.account-form__back-link {
  font-size: 13px;
  color: #117bbf;
  text-decoration: none;
}

.account-form__back-link:hover {
  text-decoration: underline;
}

/* スマホ対応 */
@media (max-width: 480px) {
  .account-form-page {
    margin: 28px auto 60px;
  }

  .account-form-card {
    padding: 20px 16px 24px;
  }

  .account-form-page__title {
    font-size: 20px;
  }
}
/* アカウント削除用のカード強調 */
.account-form-card--danger {
  border: 1px solid #f5c2c0;
  background: #fff7f7;
}

/* 説明文・注意リスト */
.account-delete__text {
  font-size: 13px;
  color: #844;
  line-height: 1.6;
  margin-bottom: 12px;
}

.account-delete__list {
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: 13px;
  color: #844;
}

/* 危険アクションボタン */
.account-form__submit--danger {
  background: linear-gradient(135deg, #d9534f, #f37b72);
  box-shadow: 0 8px 18px rgba(217, 83, 79, 0.35);
}

.account-form__submit--danger:hover {
  box-shadow: 0 10px 22px rgba(217, 83, 79, 0.4);
  opacity: 0.97;
}

.account-form__submit--danger:active {
  box-shadow: 0 4px 10px rgba(217, 83, 79, 0.3);
}

/* Habits Index */

/* ページ全体 */
.habits-page {
  --haby-blue: #117BBF;
  --haby-mint: #6AACB0;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6eef5;
  --bg: #f6fbff;
  --card: #ffffff;

  min-height: calc(100vh - var(--bottom-nav-height, 0px));
  padding: 18px 14px 28px;
  background: #fff;
}

.habits-container {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

/* タイトル */
.habits-hero {
  background: linear-gradient(
    135deg,
    rgba(17,123,191,0.18),
    rgba(106,172,176,0.14)
  );
  border: 1px solid rgba(17,123,191,0.18);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.habits-hero__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.2px;
}

.habits-hero__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* 共通カード */
.haby-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

/* 一覧グリッド */
.habits-list {
  display: grid;
  gap: 12px;
}

/* 習慣カード */
.habit-item {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

.habit-item:hover {
  transform: translateY(-2px);
  border-color: rgba(17,123,191,0.22);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
}

.habit-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.habit-item__name {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  color: var(--text);
}

.habit-item__name a {
  color: inherit;
  text-decoration: none;
}

.habit-item__name a:hover {
  color: var(--haby-blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* 右側のバッジ（カテゴリなど） */
.habit-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--haby-blue);
  background: rgba(88, 157, 200, 0.10);
  border: 1px solid rgba(17,123,191,0.18);
}

.habit-badge-danger {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: rgb(255, 255, 255);
  background: rgb(241, 104, 104);
  border: 1px solid rgb(251, 93, 93);
}

/* アクション（編集/削除など） */
.habit-item__actions {
  margin-top: 12px;
  display: flex;
  gap: 15px;
}

/* ボタン */
.habits-page .haby-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.habits-page .haby-btn--primary {
  color: #fff;
  background: var(--haby-blue);
  box-shadow: 0 10px 20px rgba(17,123,191,0.22);
}

.habits-page .haby-btn--ghost {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

/* 0件のとき */
.habits-empty {
  text-align: center;
  padding: 22px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(17,123,191,0.25);
  background: rgba(17,123,191,0.06);
  color: var(--muted);
}

.habits-empty__title {
  margin: 0;
  font-weight: 900;
  color: var(--text);
}

.habits-empty__text {
  margin: 6px 0 0;
  font-size: 13px;
}
/* Habit Form */

/* 画面全体 */
.habit-form-page {
  --haby-blue: #117BBF;
  --haby-mint: #6AACB0;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6eef5;
  --bg: #f6fbff;
  --card: #ffffff;
  --danger: #c43535;

  min-height: calc(100vh - var(--bottom-nav-height, 0px));
  padding: 18px 14px 28px;
  background: #fff;
}

.habit-form-container {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

/* 見出しカード */
.habit-form-hero {
  background: linear-gradient(
    135deg,
    rgba(17, 123, 191, 0.18),
    rgba(106, 172, 176, 0.14)
  );
  border: 1px solid rgba(17, 123, 191, 0.18);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.habit-form-hero__title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.habit-form-hero__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* フォームカード */
.habit-form-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

/* フォーム */
.habit-form {
  position: relative;
  display: grid;
  gap: 14px;
}

.habit-form__group {
  display: grid;
  gap: 6px;
}

.habit-form__label {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.2px;
}

.habit-form__hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* 入力 */
.habit-form input[type="text"],
.habit-form textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid #d9e6f2;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.habit-form textarea {
  min-height: 120px;
  resize: vertical;
}

.habit-form input[type="text"]:focus,
.habit-form textarea:focus {
  border-color: rgba(17, 123, 191, 0.55);
  box-shadow: 0 0 0 4px rgba(17, 123, 191, 0.12);
}

/* エラー表示 */
.field_with_errors input,
.field_with_errors textarea {
  border-color: rgba(239, 68, 68, 0.75) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10) !important;
}

.habit-form-errors {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
  border-radius: 16px;
  padding: 12px 12px;
  color: var(--text);
}

.habit-form-errors__title {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 13px;
}

.habit-form-errors ul {
  margin: 0;
  padding-left: 18px;
  color: #b91c1c;
  font-size: 13px;
}

/* ボタン行 */
.habit-form__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

/* habyボタン */
.habit-form-page .haby-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.habit-form-page .haby-btn--primary {
  color: #fff;
  background: var(--haby-blue);
  box-shadow: 0 10px 20px rgba(17, 123, 191, 0.22);
}

.habit-form-page .haby-btn--ghost {
  color: var(--text);
  background: #fff;
  border-color: #d9e6f2;
}

.habit-form-page .haby-btn--danger {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.18);
}

/* 補助リンク */
.habit-form__back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.habit-form__back:hover {
  color: var(--haby-blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* 曜日選択UI */
.schedule-days-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.schedule-preset-btn {
  padding: 6px 12px;
  border: 1px solid #d9e6f2;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.schedule-preset-btn:hover {
  border-color: var(--haby-blue);
  color: var(--haby-blue);
  background: rgba(17, 123, 191, 0.05);
}

.schedule-days-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.schedule-day-toggle {
  position: relative;
  cursor: pointer;
}

.schedule-day-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.schedule-day-toggle__label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #d9e6f2;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.schedule-day-toggle:hover .schedule-day-toggle__label {
  border-color: var(--haby-blue);
  color: var(--haby-blue);
}

.schedule-day-toggle.is-selected .schedule-day-toggle__label,
.schedule-day-toggle input[type="checkbox"]:checked + .schedule-day-toggle__label {
  border-color: var(--haby-blue);
  background: var(--haby-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(17, 123, 191, 0.25);
}

/* 土日の色分け */
.schedule-day-toggle[data-day="0"] .schedule-day-toggle__label,
.schedule-day-toggle[data-day="6"] .schedule-day-toggle__label {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.schedule-day-toggle[data-day="0"]:hover .schedule-day-toggle__label,
.schedule-day-toggle[data-day="6"]:hover .schedule-day-toggle__label {
  border-color: #ef4444;
  color: #ef4444;
}

.schedule-day-toggle[data-day="0"].is-selected .schedule-day-toggle__label,
.schedule-day-toggle[data-day="6"].is-selected .schedule-day-toggle__label,
.schedule-day-toggle[data-day="0"] input[type="checkbox"]:checked + .schedule-day-toggle__label,
.schedule-day-toggle[data-day="6"] input[type="checkbox"]:checked + .schedule-day-toggle__label {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}



/* Habit Show  */

/* 画面全体 */
.habit-show-page {
  --haby-blue: #117BBF;
  --haby-mint: #6AACB0;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6eef5;
  --bg: #f6fbff;
  --card: #ffffff;
  --danger: #ef4444;

  min-height: calc(100vh - var(--bottom-nav-height, 0px));
  padding: 18px 14px 28px;
  background: #fff;
}

.habit-show-container {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

/* ヒーロー */
.habit-show-hero {
  background: linear-gradient(135deg, rgba(17,123,191,0.18), rgba(106,172,176,0.14));
  border: 1px solid rgba(17,123,191,0.18);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.habit-show-hero__titleRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.habit-show-hero__title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  color: var(--text);
}

.habit-show-hero__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* バッジ */
.habit-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: var(--haby-blue);
  background: rgba(17,123,191,0.10);
  border: 1px solid rgba(17,123,191,0.18);
}

/* カード */
.habit-show-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.habit-show-card::before {
  content: "";
  position: absolute;
  inset: -46px auto auto -56px;
  width: 160px;
  height: 100px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(17,123,191,0.16), rgba(106,172,176,0.14));
}

.habit-show-card__content {
  position: relative;
  display: grid;
  gap: 10px;
}

.habit-show-card__label {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.habit-show-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
}

/* 何もないとき */
.habit-show-empty {
  text-align: center;
  padding: 22px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(17,123,191,0.25);
  background: rgba(17,123,191,0.06);
  color: var(--muted);
  position: relative;
}

/* ボタン */
.habit-show-page .haby-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.habit-show-page .haby-btn--primary {
  color: #fff;
  background: var(--haby-blue);
  box-shadow: 0 10px 20px rgba(17,123,191,0.22);
}

.habit-show-page .haby-btn--ghost {
  color: var(--text);
  background: #fff;
  border-color: #d9e6f2;
}

.habit-show-page .haby-btn--danger {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 10px 20px rgba(239,68,68,0.18);
}

.habit-show-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
/* Today  */

:root {
  --haby-primary: #117bbf;
  --haby-secondary: #6aacb0;
  --haby-text: #0f172a;
  --haby-muted: rgba(15, 23, 42, 0.62);
  --haby-line: rgba(17, 123, 191, 0.18);
}

.comingsoon {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 28px 16px 44px;
  background: radial-gradient(1200px 700px at 30% 0%, rgba(17, 123, 191, 0.18), transparent 55%),
              radial-gradient(900px 600px at 100% 30%, rgba(106, 172, 176, 0.18), transparent 55%),
              linear-gradient(180deg, #ffffff 0%, #fbfdff 60%, #ffffff 100%);
  overflow: hidden;
}

.comingsoon__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --- blobs --- */
.comingsoon__blob {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.55;
  transform: translate3d(0,0,0);
  mix-blend-mode: multiply;
}

/* --- card --- */
.comingsoon__card {
  position: relative;
  width: min(560px, 100%);
  padding: 22px 18px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--haby-line);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.08),
    0 6px 18px rgba(17, 123, 191, 0.08);
}

.comingsoon__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(17, 123, 191, 0.16), rgba(106, 172, 176, 0.14));
  border: 1px solid rgba(17, 123, 191, 0.22);
}

.comingsoon__badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--haby-primary);
  box-shadow: 0 0 0 6px rgba(17, 123, 191, 0.16);
  animation: habyPulse 1.6s ease-in-out infinite;
}

@keyframes habyPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(17, 123, 191, 0.14); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(17, 123, 191, 0.10); }
}

.comingsoon__badge-text {
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.75);
}

.comingsoon__title {
  margin: 14px 0 10px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--haby-text);
  font-weight: 950;
}

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

.comingsoon__meter {
  height: 12px;
  border-radius: 999px;
  background: rgba(14, 74, 213, 0.06);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.comingsoon__meter-bar {
  height: 100%;
  width: 60%;
  border-radius: 999px;
  background: rgba(17, 123, 191, 0.85);
  animation: habyMeter 2.2s ease-in-out infinite;
}

@keyframes habyMeter {
  0%   { transform: translateX(-35%); }
  50%  { transform: translateX(15%); }
  100% { transform: translateX(-35%); }
}

.comingsoon__chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comingsoon__chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.7);
  background: rgba(17, 123, 191, 0.08);
  border: 1px solid rgba(17, 123, 191, 0.16);
}

.comingsoon__actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.comingsoon__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.comingsoon__btn:active {
  transform: translateY(1px) scale(0.99);
}

.comingsoon__btn--primary {
  color: #fff;
  background: linear-gradient(90deg, rgba(17, 123, 191, 1), rgba(106, 172, 176, 1));
  box-shadow: 0 10px 22px rgba(17, 123, 191, 0.18);
}

.comingsoon__btn--primary:hover {
  filter: brightness(1.02);
  box-shadow: 0 14px 28px rgba(17, 123, 191, 0.22);
}

.comingsoon__btn--ghost {
  color: rgba(15, 23, 42, 0.8);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(17, 123, 191, 0.18);
}

.comingsoon__btn--ghost:hover {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.comingsoon__note {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.45);
  letter-spacing: 0.14em;
  font-weight: 800;
}

.comingsoon__br { display: none; }

@media (min-width: 520px) {
  .comingsoon__actions { grid-template-columns: 1fr 1fr; }
  .comingsoon__title { font-size: 32px; }
  .comingsoon__br { display: inline; }
}

/* ==========================================
   Today's Habits Page
   ========================================== */

.todays-habits-page {
  min-height: calc(100vh - var(--bottom-nav-height, 0px));
  padding: 18px 14px 28px;
  background: #fff;
}

.todays-habits-container {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

/* Hero Section */
.todays-habits-hero {
  background: linear-gradient(
    135deg,
    rgba(17, 123, 191, 0.18),
    rgba(106, 172, 176, 0.14)
  );
  border: 1px solid rgba(17, 123, 191, 0.18);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.todays-habits-hero__title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--haby-text);
}

.todays-habits-hero__date {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--haby-muted);
}

/* Section */
.todays-habits-section {
  background: #fff;
  border: 1px solid rgba(17, 123, 191, 0.12);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.todays-habits-section--completed {
  background: rgba(17, 123, 191, 0.02);
}

.todays-habits-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--haby-text);
}

.todays-habits-section__icon {
  display: flex;
  color: var(--haby-muted);
}

.todays-habits-section__icon--completed {
  color: var(--haby-primary);
}

.todays-habits-section__count {
  font-weight: 600;
  color: var(--haby-muted);
}

/* Habit List */
.todays-habits-list {
  display: grid;
  gap: 10px;
}

/* Habit Item */
.todays-habit-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(17, 123, 191, 0.12);
  border-radius: 14px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}

.todays-habit-item:hover {
  box-shadow: 0 4px 12px rgba(17, 123, 191, 0.08);
}

.todays-habit-item--completed {
  background: rgba(17, 123, 191, 0.04);
  border-color: rgba(17, 123, 191, 0.18);
}

.todays-habit-item__info {
  flex: 1;
  min-width: 0;
}

.todays-habit-item__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--haby-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todays-habit-item--completed .todays-habit-item__name {
  color: var(--haby-muted);
}

.todays-habit-item__schedule {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--haby-muted);
}

/* Habit Button */
.todays-habit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.todays-habit-btn:not(.todays-habit-btn--completed) {
  background: var(--haby-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(17, 123, 191, 0.25);
}

.todays-habit-btn:not(.todays-habit-btn--completed):hover {
  background: #0e6aa3;
  box-shadow: 0 6px 16px rgba(17, 123, 191, 0.30);
  transform: translateY(-1px);
}

.todays-habit-btn:not(.todays-habit-btn--completed):active {
  transform: translateY(0);
}

.todays-habit-btn--completed {
  background: rgba(17, 123, 191, 0.08);
  color: var(--haby-primary);
  border: 1px solid rgba(17, 123, 191, 0.18);
}

.todays-habit-btn--completed:hover {
  background: rgba(17, 123, 191, 0.12);
}

/* Complete Message */
.todays-habits-complete-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  background: linear-gradient(
    135deg,
    rgba(17, 123, 191, 0.08),
    rgba(106, 172, 176, 0.06)
  );
  border: 1px solid rgba(17, 123, 191, 0.15);
  border-radius: 18px;
  text-align: center;
}

.todays-habits-complete-message__icon {
  color: var(--haby-primary);
  margin-bottom: 12px;
}

.todays-habits-complete-message__text {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--haby-text);
}

/* Empty State */
.todays-habits-empty {
  text-align: center;
  padding: 32px 16px;
  background: rgba(17, 123, 191, 0.04);
  border: 1px solid rgba(17, 123, 191, 0.12);
  border-radius: 18px;
}

.todays-habits-empty__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--haby-text);
}

.todays-habits-empty__text {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--haby-muted);
}

.todays-habits-empty__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.todays-habits-empty__actions .haby-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.todays-habits-empty__actions .haby-btn--primary {
  background: var(--haby-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(17, 123, 191, 0.25);
}

.todays-habits-empty__actions .haby-btn--ghost {
  background: #fff;
  color: var(--haby-text);
  border-color: rgba(17, 123, 191, 0.18);
}
/* 静的ページ（プライバシーポリシー・利用規約・お問い合わせ）共通 */
.static-page {
  --haby-blue: #117BBF;
  --haby-mint: #6AACB0;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;

  min-height: calc(100vh - var(--bottom-nav-height, 0px));
  padding: 20px 16px 40px;
  background: #ffffff;
}

.static-page__container {
  max-width: 680px;
  margin: 0 auto;
}

/* ヒーローセクション（タイトル） */
.static-page__hero {
  background: linear-gradient(135deg, #57aee8 0%, #29adf9 100%);
  border-radius: 16px;
  padding: 28px 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(17, 123, 191, 0.2);
}

.static-page__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.static-page__updated {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--haby-blue);
  background: #ffffff;
}

/* コンテンツカード */
.static-page__content {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* セクション */
.static-page__section {
  margin-bottom: 28px;
}

.static-page__section:last-child {
  margin-bottom: 0;
}

.static-page__section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.static-page__section-title::before {
  content: "";
  display: block;
  width: 4px;
  height: 20px;
  background: var(--haby-blue);
  border-radius: 2px;
}

.static-page__text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  margin: 0 0 12px;
}

.static-page__text:last-child {
  margin-bottom: 0;
}

/* リスト */
.static-page__list {
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.static-page__list li {
  position: relative;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  padding-left: 22px;
  margin-bottom: 10px;
}

.static-page__list li:last-child {
  margin-bottom: 0;
}

.static-page__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--haby-blue);
  border-radius: 50%;
}

.static-page__list li strong {
  color: var(--text);
  font-weight: 600;
}

/* リンク */
.static-page__content a {
  color: var(--haby-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.static-page__content a:hover {
  color: #0e6aa5;
  text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .static-page {
    padding: 16px 14px 80px;
  }

  .static-page__hero {
    padding: 24px 16px;
    border-radius: 14px;
  }

  .static-page__title {
    font-size: 20px;
  }

  .static-page__content {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .static-page__section-title {
    font-size: 15px;

  }

  .static-page__text,
  .static-page__list li {
    font-size: 13px;
  }
}

.contact-form {
  max-width: 640px;
}

.contact-form__field {
  margin: 16px 0;
}

.contact-form__errors {
  padding: 12px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  border-radius: 8px;
}

.contact-form__actions {
  margin-top: 20px;
}

.contact-form__honeypot {
  display: none;
}
