@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* =====================================================================
   お客様マイページ 新UI
   （salon 新UI と同じネイビー #384878 系トークンで統一）
===================================================================== */
:root {
    --color-primary:      #384878;
    --color-primary-dark: #232e4d;
    --color-primary-light:#dfe5f5;
    --color-bg:           #f2f4fa;
    --color-border:       #d8dce8;
    --color-text:         #333;
    --color-muted:        #777;
    --radius:             8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans JP", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.7;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { opacity: 0.75; }

/* =====================
   ヘッダー・ナビ
===================== */
.mp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.mp-header-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.mp-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15em;
    font-weight: 700;
    color: #fff;
}
.mp-brand:hover { opacity: 1; }

.mp-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.mp-nav a {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: var(--radius);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.mp-nav a:hover {
    background-color: var(--color-primary-dark);
    opacity: 1;
}
.mp-nav a.active {
    background-color: #fff;
    color: var(--color-primary);
}
.mp-nav a.logout { opacity: 0.85; }

/* =====================
   レイアウト・カード
===================== */
.mp-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}
.mp-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 18px;
}
.mp-card-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary-light);
}
.mp-lead {
    font-size: 1.05em;
    font-weight: 500;
}
.mp-lead .num {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.15em;
}
.mp-note {
    color: var(--color-muted);
    font-size: 0.9em;
    margin: 0 0 14px;
}
.mp-back {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.9em;
    font-weight: 500;
}

/* =====================
   テーブル
===================== */
.mp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.mp-table th,
.mp-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: middle;
}
.mp-table th {
    color: var(--color-muted);
    font-weight: 500;
    white-space: nowrap;
}
/* 来店履歴（横並び行） */
.mp-history th { color: var(--color-primary); font-weight: 700; width: 30%; }
.mp-history td { color: var(--color-text); }
.mp-history tr:last-child th,
.mp-history tr:last-child td { border-bottom: none; }
.mp-price { font-weight: 700; }
.mp-detail-link {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 500;
}
.mp-detail-link:hover { opacity: 0.85; }

/* 明細テーブル（縦：見出し / 内容） */
.mp-detail-table th { width: 34%; background: var(--color-bg); }
.mp-detail-table tr:last-child th,
.mp-detail-table tr:last-child td { border-bottom: none; }
.mp-total td { font-size: 1.1em; font-weight: 700; color: var(--color-primary); }

/* =====================
   ランク・ポイント
===================== */
.mp-rank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 6px;
}
.mp-stat {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.mp-stat .label { font-size: 0.85em; color: var(--color-muted); }
.mp-stat .value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 4px;
}

/* =====================
   フォーム・ボタン
===================== */
.mp-form-row { margin-bottom: 14px; }
.mp-form-row label {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--color-muted);
    margin-bottom: 4px;
}
.mp-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1em;
    font-family: inherit;
}
.mp-input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.btn {
    display: inline-block;
    padding: 11px 22px;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover { background-color: var(--color-primary-dark); }
.btn-block { width: 100%; }

/* =====================
   施術写真
===================== */
.mp-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mp-photos .photoimgs {
    width: 120px;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
}

/* =====================
   ログイン画面
===================== */
.mp-login-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    gap: 16px;
}
.mp-login-wrap {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 14px rgba(0,0,0,0.12);
    padding: 34px 30px;
    width: 380px;
    max-width: 100%;
    text-align: center;
}
.mp-login-wrap img {
    max-width: 200px;
    width: 60%;
    margin-bottom: 18px;
}
.mp-login-title {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 18px;
}
.mp-login-wrap .mp-form-row { text-align: left; }
.mp-login-error {
    background: #fdecea;
    color: #c62828;
    border-radius: var(--radius);
    padding: 9px 12px;
    font-size: 0.9em;
    margin-bottom: 14px;
    font-weight: 500;
}
.mp-news {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    padding: 18px 20px;
    width: 380px;
    max-width: 100%;
    text-align: left;
}
.mp-news-title {
    font-weight: 700;
    color: var(--color-primary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}
.mp-news-contents {
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.9em;
}

/* =====================
   レスポンシブ
===================== */
@media screen and (max-width: 480px) {
    .mp-header-inner { justify-content: center; }
    .mp-nav { width: 100%; justify-content: flex-start; }
    .mp-rank-grid { grid-template-columns: 1fr; }
    .mp-history th { width: 40%; }
}
