/* style.css */

/* 基本リセット */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: rgb(26, 158, 92);
  --primary-hover: rgb(26, 158, 92);
  --text-color: #333333;
  --bg-color: #f9fafb;
  --white: #ffffff;
  --gray-border: #e5e7eb;
  --gray-text: #6b7280;
  --error-red: #ef4444;
  --income-green: rgb(26, 158, 92);
  --payment-red: #ef4444;
}

html, body {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  min-height: 100vh;
  padding: 80px 20px 120px;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
  overflow-x: hidden;
}

/* 固定ヘッダー */
.fixed-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: space-between; /* 左右の要素を配置 */
  padding: 0 20px;
  z-index: 100;
  /* position: relative;  <-- これがあると絶対配置の基準になってしまうため削除してもよいが、念のため残す場合は注意 */
}

.header-left {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: -0.5px;
  z-index: 10; /* 前面に */
  /* 幅を確保して、左端に固定 */
  flex: 0 0 auto;
}

.header-center {
  /* 絶対配置で画面中央に強制配置 */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%; /* 左右ボタンと被らないように制限 */
  text-align: center;
  z-index: 1; /* 最背面ではないが、ボタンよりは下 */
}

.header-right {
  /* 右端に固定 */
  flex: 0 0 auto;
  z-index: 10;
}

.header-right button {
  background: none;
  border: none;
  font-size: 24px;
  padding: 4px;
  color: var(--text-color);
  box-shadow: none;
  cursor: pointer;
}

.danger-icon-button .material-icons {
  color: var(--error-red);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
}

/* セクション */
section {
  margin-bottom: 32px;
}

h1, h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-color);
}

p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
}

.muted {
  color: var(--gray-text);
  font-size: 13px;
}

/* フォーム要素 */
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--gray-border);
  font-size: 15px;
  outline: none;
  background: #fdfdfd;
  transition: border 0.2s;
  appearance: none;
  -webkit-appearance: none;

  color: var(--text-color) !important;
}

input:focus, select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(26, 158, 92, 0.2);

  color: var(--text-color) !important;
}

select option {
  color: var(--text-color);
}

/* 検索ボックス */
.search-input {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>');
  background-repeat: no-repeat;
  background-position: 12px center;
  padding-left: 40px !important;
}

/* 入力欄の中にボタンを入れるスタイル */
.input-group {
  position: relative;
  margin-bottom: 16px;
}
.input-group input {
  margin-bottom: 0;
  padding-right: 80px;
}
.input-group button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  font-size: 13px;
  margin: 0;
  border-radius: 8px;
}

.title-with-category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.title-with-category-row input {
  margin-bottom: 0;
  flex: 1;
}

.category-picker-button {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--gray-border);
  background: #f9fafb;
  color: var(--text-color);
  font-size: 24px;
  font-weight: 400;
  flex: 0 0 48px;
}

.category-picker-button:hover,
.category-picker-button:active {
  background: #f3f4f6;
  color: var(--text-color);
}

/* ボタン */
button {
  cursor: pointer;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  background: var(--primary-color);
  color: #fff;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

button:hover {
  background: var(--primary-hover);
}

button:active {
  background: var(--primary-hover);
}

button.full {
  width: 100%;
}

button.secondary {
  background: #f3f4f6;
  color: #4b5563;
  box-shadow: none;
}
button.secondary:hover {
  background: #e5e7eb;
}

button.danger {
  background: #fee2e2;
  color: var(--error-red);
  box-shadow: none;
}
button.small {
  padding: 6px 12px;
  font-size: 12px;
  height: auto;
}

/* カード共通スタイル */
.card-list {
  list-style: none;
  padding: 0;
}

.card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  margin-bottom: 12px;
  transition: background 0.1s;
}

.settlement-record-card {
  border-color: var(--primary-color);
}

.card-item.clickable {
  cursor: pointer;
}
.card-item.clickable:active {
  background: #f9fafb;
}

/* ★修正: アイコンの背景色・丸みを削除 */
.card-icon {
  font-size: 24px;
  /* width, height の固定を解除しても良いが、レイアウト崩れ防止のため残す場合は background: transparent に */
  width: 40px; 
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: transparent; /* 背景透明 */
  border-radius: 0;        /* 角丸なし */
  
  flex-shrink: 0;
}

.card-main {
  flex: 1;
  min-width: 0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 15px;
}

.card-meta {
  font-size: 12px;
  color: var(--gray-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.index-howto-head {
  margin-bottom: 16px;
}

.index-howto-list {
  display: grid;
  gap: 14px;
}

.index-howto-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--gray-border);
  background: var(--white);
}

.index-howto-step {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(26, 158, 92, 0.10);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.index-howto-card h3 {
  margin: 14px 0 8px;
  font-size: 19px;
  line-height: 1.3;
  color: #111827;
}

.index-howto-card p {
  color: var(--gray-text);
}

.index-howto-shot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.index-howto-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 設定画面のメンバーリスト用 */
.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  margin-bottom: 8px;
}
.member-card input {
  margin: 0;
  border: none;
  background: transparent;
  font-weight: bold;
  font-size: 15px;
  padding: 0;
  width: 100%;
}
.member-card input:focus {
  box-shadow: none;
  outline: none;
  border-bottom: 1px solid var(--primary-color);
  border-radius: 0;
}
.member-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ボトムバー */
.bottom-actions {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 440px;
  display: flex;
  gap: 10px;
  z-index: 90;
  pointer-events: none;
}
.bottom-actions > * {
  pointer-events: auto;
}
.bottom-actions.single {
  justify-content: center;
}
.bottom-actions.bottom-actions-inline {
  position: static;
  bottom: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 32px 0 24px;
  pointer-events: auto;
}

/* 精算画面のタブ */
.tab-container {
  display: flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-text);
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  box-shadow: none;
}
.tab-btn.active {
  background: var(--white);
  color: var(--primary-color);
  box-shadow: none;
}

.settlement-display-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.settlement-display-meta {
  margin: 0;
}

.settlement-display-currency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.settlement-display-currency span {
  white-space: nowrap;
}

.settlement-display-select {
  width: auto;
  min-width: 88px;
  margin-bottom: 0;
  padding: 10px 34px 10px 12px;
  background-color: var(--white);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.settlement-total {
  text-align: right;
  font-weight: 700;
  margin-top: 10px;
}

/* 参加者選択チップ */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
}
.chip-label {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.chip-label:has(input:checked) {
  background: rgba(26, 158, 92, 0.10);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: bold;
}
.chip-label input {
  display: none;
}

/* トップページ用 */
.hero {
  text-align: center;
  padding: 60px 0 40px;
  background: #ffffff;
  margin: -80px -20px 40px;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}
.hero-logo {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 10px;
  letter-spacing: -1px;
}
.hero-copy {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 24px;
  opacity: 0.8;
}

.hero-primary-cta-wrap {
  padding: 0 24px;
}

.hero-app-download {
  margin-top: 14px;
}

.hero-app-download-text {
  margin-bottom: 8px;
}

.hero-app-badges {
  display: flex;
  justify-content: center;
}

.hero-app-badge--ja,
.hero-app-badge--en {
  display: none !important;
}

html[lang="ja"] .hero-app-badge--ja,
html[lang="en"] .hero-app-badge--en {
  display: inline-block !important;
}

/* トースト通知 */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 2000;
  width: max-content;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(10px); }
.toast.error { background: rgba(239, 68, 68, 0.95); }

/* フッター */
footer {
  text-align: center;
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-border);
}
footer a {
  color: var(--gray-text);
  text-decoration: none;
  margin: 0 8px;
  display: inline-block;
  padding: 4px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
}

.footer-language-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-language-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-text);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--gray-border);
  border-radius: 999px;
  background: #f9fafb;
}

.lang-btn {
  min-width: 78px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.lang-btn:hover,
.lang-btn:active {
  background: transparent;
  color: var(--text-color);
}

.lang-btn.active {
  background: var(--primary-color);
  color: #fff;
}

.legal-footer {
  margin-bottom: 16px;
}

.contact-container {
  padding-top: 80px;
  padding-bottom: 24px;
}

.contact-form-embed {
  width: 100%;
  min-height: 1200px;
  border: 0;
  background: #fff;
}

.explain-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--gray-border);
  background: #ffffff;
  margin-bottom: 24px;
}

.explain-card h2,
.explain-card h3 {
  margin-bottom: 12px;
}

.explain-card p + p,
.explain-card ul + p,
.explain-card p + ul {
  margin-top: 10px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--gray-border);
  border-radius: 16px;
  background: #fff;
  padding: 0 16px;
}

.faq-item[open] {
  border-color: rgba(26, 158, 92, 0.26);
}

.faq-question {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  color: var(--gray-text);
  font-size: 18px;
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "-";
}

.faq-answer {
  padding: 0 0 16px;
}

/* ユーティリティ */
.text-green { color: var(--income-green) !important; font-weight: bold; }
.text-red { color: var(--payment-red) !important; font-weight: bold; }

.material-icons {
  font-size: 28px;
  color: #333;
}

.hidden {
  display: none !important;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pro-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 158, 92, 0.12);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 700;
}

.group-basic-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.group-basic-fields {
  flex: 1;
}

.group-basic-fields input {
  margin-bottom: 8px;
}

.static-field {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--gray-border);
  background: #f9fafb;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.static-field-multiline {
  white-space: pre-wrap;
  line-height: 1.6;
}

.settings-group-id-note {
  margin-top: 8px;
}

.group-icon-editor {
  width: 96px;
  flex: 0 0 96px;
}

.group-icon-button,
.group-icon-shell {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(26, 158, 92, 0.12);
  border: 1px solid rgba(26, 158, 92, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.group-icon-button {
  padding: 0;
  box-shadow: none;
}

.group-icon-button:hover {
  transform: none;
  background: rgba(26, 158, 92, 0.12);
}

.group-icon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--primary-color);
  font-size: 26px;
  font-weight: 800;
}

.group-overview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 158, 92, 0.08) 0%, #ffffff 100%);
}

.group-overview-main {
  min-width: 0;
  flex: 1;
}

.group-overview-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 4px;
}

.group-overview-meta {
  color: var(--gray-text);
  font-size: 12px;
}

.history-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-card .group-icon-shell {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.history-card .group-icon-fallback {
  font-size: 18px;
}

.segment-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.segment-group.segment-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.segment-group.segment-scroll::-webkit-scrollbar {
  display: none;
}

.segment-group.segment-scroll .segment-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.segment-group.disabled {
  opacity: 0.56;
  pointer-events: none;
}

.segment-btn {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--gray-border);
  background: #fff;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  padding: 10px 12px;
}

.segment-btn:hover {
  transform: none;
  background: #f8faf8;
}

.segment-btn.active {
  border-color: rgba(26, 158, 92, 0.35);
  background: rgba(26, 158, 92, 0.10);
  color: var(--primary-color);
}

.value-entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.value-entry-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--gray-border);
  background: #fff;
}

.value-entry-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
}

.value-entry-input-wrap {
  width: 148px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.value-entry-input-wrap input {
  margin: 0;
  text-align: right;
}

.value-entry-unit {
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.value-entry-preview {
  min-width: 72px;
  text-align: right;
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 700;
}

.currency-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.currency-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.currency-card-label {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.currency-card-meta {
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 500;
}

.currency-base-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(26, 158, 92, 0.12);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 700;
}

.currency-card-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-card-controls input {
  margin: 0;
  text-align: right;
}

.expense-image-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.expense-image-gallery::-webkit-scrollbar {
  display: none;
}

.expense-image-link {
  display: block;
  flex: 0 0 168px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
  background: #f9fafb;
}

.expense-image-thumb {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.action-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.36);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 300;
}

.action-sheet-panel {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.action-sheet-title {
  padding: 16px 18px 10px;
  text-align: center;
  color: var(--gray-text);
  font-size: 13px;
  font-weight: 700;
}

.action-sheet-option {
  width: 100%;
  border: none;
  border-top: 1px solid var(--gray-border);
  border-radius: 0;
  background: #fff;
  color: var(--text-color);
  box-shadow: none;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 600;
}

.action-sheet-option:hover,
.action-sheet-option:active {
  transform: none;
  background: #f9fafb;
}

.action-sheet-option.danger {
  color: var(--error-red);
}

.action-sheet-option.cancel {
  font-weight: 700;
}

.date-divider {
  list-style: none;
  margin: 16px 0 6px;
  color: var(--gray-text);
  font-size: 13px;
  font-weight: 700;
}

.expense-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.expense-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.expense-meta-symbol {
  font-size: 13px !important;
  line-height: 1;
  color: var(--gray-text);
}

body.landing-page {
  background: #f3f5f1;
}

.landing-page .landing-shell {
  max-width: 1120px;
  padding: 24px 28px 64px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.08);
}

.landing-page,
.landing-page button,
.landing-page input,
.landing-page select,
.landing-page textarea {
  font-family: "Manrope", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.landing-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.landing-nav {
  display: inline-flex;
  align-items: center;
  gap: 26px;
}

.landing-nav a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.landing-nav a:hover,
.landing-nav a:active {
  color: #111827;
}

.landing-header-cta,
.landing-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.landing-header-cta {
  background: #111827;
  color: #fff;
}

.landing-header-cta:hover,
.landing-header-cta:active {
  background: #0f172a;
}

.landing-secondary-cta {
  border: 1px solid #d1d5db;
  color: #111827;
  background: #fff;
}

.landing-secondary-cta:hover,
.landing-secondary-cta:active {
  background: #f9fafb;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(340px, 0.86fr);
  gap: 28px;
  align-items: stretch;
  padding: 20px 0 8px;
}

.landing-hero-copy {
  padding: 28px 0 22px;
}

.landing-kicker,
.landing-section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(26, 158, 92, 0.10);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.landing-title {
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 18px 0 18px;
  color: #101828;
}

.landing-description {
  max-width: 42em;
  font-size: 17px;
  line-height: 1.78;
  color: #4b5563;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-primary-cta {
  min-width: 224px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

.landing-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.landing-proof-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.landing-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-window {
  width: 100%;
  max-width: 520px;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.10);
}

.showcase-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.showcase-balance-card {
  padding: 22px;
  border-radius: 24px;
  background: #111827;
  color: #fff;
}

.showcase-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.showcase-balance-title {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.showcase-note {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.showcase-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.showcase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid #eceff3;
  background: #fff;
}

.showcase-row strong {
  color: #111827;
  font-size: 14px;
}

.showcase-row-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.showcase-row-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.showcase-settlement {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.showcase-settlement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(26, 158, 92, 0.28);
  background: rgba(26, 158, 92, 0.06);
  color: #14532d;
  font-size: 14px;
  font-weight: 700;
}

.landing-stats,
.landing-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-stats {
  margin: 20px 0 52px;
}

.landing-stat-card,
.landing-step-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.landing-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.04em;
}

.landing-stat-label {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.landing-section {
  margin-bottom: 52px;
}

.landing-section-head {
  max-width: 720px;
  margin-bottom: 20px;
}

.landing-section-head h2 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #101828;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.landing-feature-card {
  min-height: 210px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.landing-feature-card-large {
  background: #f7faf8;
}

.landing-feature-card-accent {
  background: #111827;
  border-color: #111827;
}

.landing-feature-card-accent h3,
.landing-feature-card-accent .landing-feature-tag {
  color: #fff;
}

.landing-feature-card-accent p {
  color: rgba(255, 255, 255, 0.78);
}

.landing-feature-card-accent .landing-feature-tag {
  background: rgba(255, 255, 255, 0.12);
}

.landing-feature-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.landing-feature-card h3,
.landing-step-card h3 {
  margin: 18px 0 10px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #111827;
}

.landing-feature-card p,
.landing-step-card p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.75;
}

.landing-step-section {
  padding: 28px;
  border-radius: 32px;
  background: #f7f8f5;
  border: 1px solid #edf0ea;
}

.landing-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(26, 158, 92, 0.10);
  color: var(--primary-color);
  font-size: 15px;
  font-weight: 800;
}

.landing-history-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 52px;
}

.landing-history-panel {
  padding: 20px;
  border-radius: 28px;
  border: 1px solid #e5e7eb;
  background: #f9fbf9;
}

.landing-history-list .card-item {
  margin-bottom: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
}

.landing-empty-history {
  text-align: center;
  padding: 18px 0 8px;
}

.landing-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 32px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.landing-final-cta h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #111827;
}

.landing-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
}

.landing-footer p {
  width: 100%;
  margin-top: 2px;
  font-size: 12px;
  color: var(--gray-text);
}

.landing-footer a {
  margin: 0;
}

@media (max-width: 480px) {
  .contact-form-embed {
    min-height: 1360px;
  }

  .group-basic-row {
    align-items: stretch;
  }

  .value-entry-row {
    flex-wrap: wrap;
  }

  .value-entry-input-wrap,
  .value-entry-preview {
    width: 100%;
  }

  .value-entry-preview {
    text-align: left;
  }

  .currency-card-head,
  .currency-card-controls {
    flex-wrap: wrap;
  }

  .currency-card-controls input {
    flex: 1 1 140px;
  }

  .settlement-display-currency {
    width: 100%;
    justify-content: flex-end;
  }

  .expense-image-link {
    flex-basis: 148px;
  }

  .expense-image-thumb {
    height: 148px;
  }

  .landing-brand {
    font-size: 16px;
  }

  .landing-header-cta {
    display: none;
  }

  .landing-title {
    font-size: 42px;
  }

  .landing-description {
    font-size: 15px;
  }

  .landing-primary-cta,
  .landing-secondary-cta {
    width: 100%;
  }

  .landing-step-section,
  .landing-final-cta,
  .landing-history-panel,
  .landing-feature-card,
  .landing-stat-card,
  .landing-step-card,
  .showcase-window {
    border-radius: 24px;
  }

  .showcase-balance-title {
    font-size: 24px;
  }
}

@media (max-width: 900px) {
  .landing-page .landing-shell {
    padding: 20px 18px 52px;
  }

  .landing-header {
    flex-wrap: wrap;
  }

  .landing-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .landing-hero,
  .landing-history-section,
  .landing-final-cta {
    grid-template-columns: 1fr;
    display: grid;
  }

  .landing-stats,
  .landing-feature-grid,
  .landing-step-grid {
    grid-template-columns: 1fr;
  }

  .landing-final-actions {
    justify-content: flex-start;
  }
}
