/* 背景と基本設定 */
body {
    margin: 0;
    padding: 0;
    background: #FFE600; /* Tipponの黄色背景 */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #000;
    text-align: center;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 20px;
}

/* タイトル */
h1 {
    margin-top: 40px;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sub {
    font-size: 18px;
    margin: 10px 0 20px;
}

/* カードデザイン（白背景） */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
}

.card p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* ボタン */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-primary {
    background: #003399;
    color: #fff;
}

.btn-secondary {
    background: #ffffff;
    color: #003399;
    border: 2px solid #003399;
}

/* ボタングループ（スマホ → 縦並び） */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* PC → 横並びに */
@media (min-width: 640px) {
    .btn-group {
        flex-direction: row;
    }
    .btn {
        width: 50%;
    }
}

/* インプット系 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    margin-top: 8px;
    margin-bottom: 18px;
}

label {
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    display: block;
}

/* ラジオボタン */
input[type="radio"] {
    margin-right: 6px;
}

.page-title-wrapper {
    padding-top: env(safe-area-inset-top, 20px); /* iPhoneノッチ対応 */
    padding-bottom: 20px;
}

.page-title-wrapper .title-line {
    width: 100%;
    height: 2px;
    background: #fff;
    margin-top: 10px;
}

/* ===== 全体 ===== */
body.dashboard-bg {
    margin: 0;
    background: #f6c800; /* Tippon黄色 */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== ヘッダー ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: #f6c800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.header-logo {
    font-size: 22px;
    font-weight: 700;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* ハンバーガー */
.header-left { position: absolute; left: 10px; }
.hamburger {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,.1);
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #333;
    content: "";
    position: relative;
}
.hamburger span::before { top: -5px; position: absolute; }
.hamburger span::after  { top: 5px;  position: absolute; }

/* ===== スライドメニュー ===== */
.side-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 900;
}
.side-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    width: 260px;
    background: #fffbe6;
    height: 100%;
    position: fixed;
    top: 0;
    left: -260px;
    transition: .25s;
    z-index: 1001;
}
.side-menu.is-open { left: 0; }

.side-menu-header {
    background: #f6c800;
    padding: 18px;
    font-size: 14px;
}
.side-menu-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}
.side-menu-meta { opacity: .8; }

.side-menu-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}
.side-menu-list li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 15px;
}
.side-menu-list .icon {
    width: 24px;
    margin-right: 10px;
}

/* ===== コンテンツ ===== */
.page-wrap {
    padding: 70px 12px 70px;
    max-width: 480px;
    margin: 0 auto;
}

/* プロフィールカード */
.profile-card {
    background: #ffe45c; /* 柔らか黄色 */
    border-radius: 18px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 100px;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid white;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}
.profile-nationality { font-size: 13px; opacity: .8; }
.profile-balance { margin-top: 10px; font-size: 15px; }

/* アクションボタン */
.quick-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
}
.quick-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 999px;
    background: #003d99;
    color: white;
    font-weight: bold;
    font-size: 14px;
}
.quick-btn.secondary {
    background: white;
    color: #003d99;
}

/* ===== フッターナビ ===== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: white;
    display: flex;
    border-top: 1px solid rgba(0,0,0,.1);
    z-index: 1000;
}
.bottom-nav a {
    flex: 1;
    text-align: center;
    font-size: 11px;
    padding-top: 6px;
    color: #777;
}
.bottom-nav a .icon {
    font-size: 20px;
    margin-bottom: 2px;
}
.bottom-nav a.is-active {
    color: #003d99;
    font-weight: bold;
}

/* store_page 用 */
.store-card {
    margin-bottom: 16px;
}

.store-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.store-photo-wrap {
    margin-top: 10px;
    border-radius: 16px;
    overflow: hidden;   /* ★ これでハミ出し防止 */
}

.store-photo {
    display: block;
    width: 100%;        /* ★ カード幅にフィット */
    height: auto;
}

.store-description {
    margin-top: 12px;
    font-size: 14px;
}

.guest-fields {
  margin: 14px 0 6px;
}

.guest-fields label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}

.guest-fields input[type="text"],
.guest-fields input[type="email"] {
  width: 100%;
  max-width: 520px;
}

/* store_page.php 専用：ページ全体の背景（右端の黒帯対策含む） */
body.store-page,
body.store-page .app-wrapper{
  min-height: 100vh;
  width: 100%;
  background: #FFE600 !important;
  background-image: none !important;
  overflow-x: hidden; /* 100vw由来の横ズレ対策 */
}

.app-header, .tip-store-card, .header-icon{
 background: #FFE600 !important;
}

/* 共通レイアウト */
.app-wrapper{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header{
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 3px solid #fff;
}

.app-logo{
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 22px;
  /* text-align: center; */
}

.header-icon{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0,0,0,.25);
  color: #000;
  text-decoration: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.header-left{ left: 14px; }
.header-right{ right: 14px; }

.app-footer{
  margin-top: auto;
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #fff9c4; /* 背景と馴染む薄黄色 */
}

/* ダッシュボード main の横幅を store_page と同様に抑える */
body.store-page .app-main {
  width: 100%;
  max-width: 480px;          /* PCでも広がり過ぎない */
  margin: 0 auto;            /* 中央寄せ */
  padding: 22px 16px 40px;   /* 余白 */
  box-sizing: border-box;
}

/* footer を store_page と同じトーンに揃える */
body.store-page .app-footer{
  background: #FFE600 !important;
  background-image: none !important;
  border-top: 1px solid rgba(0,0,0,.12);
}

body.store-page .app-footer small{
  color: #000;
}

/* ヘッダー下の白線（store_page と完全一致） */
body.store-page .app-header {
  border-bottom: 3px solid #ffffff !important;
}

/* フッター上の白線（store_page と完全一致） */
body.store-page .app-footer {
  border-top: 3px solid #ffffff !important;
}

/* ===== 丸サムネ（アバター）を固定サイズに制御 ===== */
.avatar-wrap{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
}

/* imgの全体ルール（width:100%など）に負けないようにする */
.avatar-wrap img.avatar{
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;

  border-radius: 50%;
  object-fit: cover;
  display: block;

  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== dashboard のサムネを receive_list と同等にする ===== */
.profile-card .profile-avatar{
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #fff;
}

.profile-card .profile-avatar img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* まず全体で box-sizing を統一（既にあれば不要） */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 受け取りカード内のボタンがはみ出さないようにする */
.receive-item .btn-primary,
.receive-desc .btn-primary,
.tip-store-card .btn-primary {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* aタグのとき、余計な幅計算が崩れないように */
.receive-item a.btn-primary {
  text-decoration: none;
}

/* それでもはみ出す場合の保険（親側が狭い/計算ズレするケース） */
.receive-item,
.receive-desc,
.tip-store-card {
  overflow: hidden;
}


