/* マイページ。お店の方がスマホで使うことが多いので、押しやすさと読みやすさを優先する */
:root {
  --brand: #C2570A;
  --brand-dark: #9E4507;
  --accent: #FFE15A;
  --tint: #FFF6EC;
  --ink: #2B2622;
  --ink-2: #5A524C;
  --ink-3: #847A72;
  --line: #E7E1DB;
  --bg: #F7F5F3;
  --white: #fff;
  --danger: #B42318;
  --danger-tint: #FEF3F2;
  --ok: #067647;
  --ok-tint: #ECFDF3;
  --warn: #B54708;
  --warn-tint: #FFFAEB;
  --info: #175CD3;
  --info-tint: #EFF8FF;
}

*, *::before, *::after { box-sizing: border-box; }
body.my {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.8 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); }
h1, h2, p { margin: 0; }
p + p { margin-top: 8px; }
:focus-visible { outline: 3px solid #F3B37A; outline-offset: 2px; }

/* ---- ヘッダーとメニュー ---- */
.my-header { background: var(--white); border-bottom: 1px solid var(--line); }
.my-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 960px; margin: 0 auto; padding: 12px 16px; }
.my-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; font-weight: 700; text-decoration: none; letter-spacing: 0.08em; }
.my-logo img { height: 28px; width: auto; }
.my-logo--center { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.my-logo--center img { height: 36px; }
.my-header__store { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.my-header__store > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-nav { display: flex; gap: 4px; max-width: 960px; margin: 0 auto; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.my-nav a { flex: 0 0 auto; padding: 10px 12px; color: var(--ink-2); font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.my-nav a[aria-current="page"] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.my-main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.my-footer { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; color: var(--ink-3); font-size: 13px; }

/* ---- 見出し・カード ---- */
.my-head { margin-bottom: 20px; }
.my-head h1 { font-size: 22px; line-height: 1.5; }
.my-head p { margin-top: 6px; color: var(--ink-2); }
.my-head .my-status { margin-top: 8px; }
.my-head__sub { color: var(--ink-3) !important; font-size: 13px; font-weight: 700; margin: 0 0 2px !important; }
.my-back { margin-bottom: 8px; font-size: 13px; }
.my-back a { color: var(--ink-3); text-decoration: none; }
.my-card { margin-bottom: 16px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.my-card--accent { border-color: #F3B37A; background: var(--tint); }
.my-card__title { margin-bottom: 12px; font-size: 16px; }
.my-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.my-grid2 .my-card { margin-bottom: 0; }
@media (max-width: 700px) { .my-grid2 { grid-template-columns: 1fr; } }
.my-muted { color: var(--ink-3); font-size: 13px; }
.my-center { text-align: center; }
.my-empty { padding: 40px 16px; text-align: center; background: var(--white); border: 1px dashed var(--line); border-radius: 12px; }
.my-points { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.my-points b { font-size: 40px; line-height: 1.1; color: var(--brand-dark); }
.my-points span { font-weight: 700; color: var(--ink-2); }
.my-deadline { margin-bottom: 8px; }
.my-deadline b { color: var(--brand-dark); font-size: 18px; }
.my-card--accent .my-btn { margin-top: 12px; }
.my-mini-list { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 14px; }
.my-todo { margin-bottom: 16px; padding: 16px 20px; background: var(--warn-tint); border: 1px solid #FEDF89; border-radius: 12px; }
.my-todo h2 { font-size: 15px; margin-bottom: 6px; color: #93370D; }
.my-todo ul { margin: 0; padding-left: 1.2em; }
.my-todo strong { color: var(--brand-dark); }

.my-dl { margin: 0; }
.my-dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.my-dl > div:last-child { border-bottom: 0; }
.my-dl dt { color: var(--ink-3); font-weight: 700; font-size: 14px; }
.my-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .my-dl > div { grid-template-columns: 1fr; gap: 0; } }

/* ---- 状態の表示 ---- */
.my-status { display: inline-block; padding: 2px 12px; border-radius: 9999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.my-status--waiting_material { background: var(--warn-tint); color: var(--warn); border-color: #FEDF89; }
.my-status--in_progress { background: var(--info-tint); color: var(--info); border-color: #B2DDFF; }
.my-status--review { background: var(--tint); color: var(--brand-dark); border-color: #F3B37A; }
.my-status--scheduled, .my-status--done { background: var(--ok-tint); color: var(--ok); border-color: #ABEFC6; }

.my-works { list-style: none; margin: 0; padding: 0; }
.my-works li + li { border-top: 1px solid var(--line); }
.my-works__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; color: var(--ink); text-decoration: none; }
.my-works__item:hover .my-works__name { color: var(--brand-dark); text-decoration: underline; }

/* ---- フォーム ---- */
.my-form { display: grid; gap: 14px; }
.my-form--inline { grid-template-columns: 1fr auto; align-items: end; margin-top: 12px; }
@media (max-width: 560px) { .my-form--inline { grid-template-columns: 1fr; } }
.my-field { display: grid; gap: 6px; }
.my-field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.my-field input, .my-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #D5CDC6; border-radius: 8px; background: var(--white); color: var(--ink); font: inherit; font-size: 16px;
}
.my-field input:focus, .my-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #FBE3CF; }
.my-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.my-revise { margin-top: 16px; padding-top: 16px; border-top: 1px solid #F3D2B5; }
.my-revise summary { cursor: pointer; font-weight: 700; color: var(--brand-dark); margin-bottom: 12px; }
.my-keys { list-style: none; margin: 12px 0; padding: 0; }
.my-keys li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.my-keys small { display: block; color: var(--ink-3); font-size: 12px; }

/* ---- ボタン ---- */
.my-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border: 1px solid #D5CDC6; border-radius: 9999px; background: var(--white); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.my-btn:hover { border-color: var(--ink-3); }
.my-btn:disabled { opacity: 0.6; cursor: wait; }
.my-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.my-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.my-btn--block { width: 100%; }
.my-btn--lg { min-width: 280px; min-height: 54px; font-size: 16px; }
@media (max-width: 560px) { .my-btn--lg { width: 100%; min-width: 0; } }
.my-link { padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.my-link--danger { color: var(--danger); }

/* ---- お知らせ ---- */
.my-notice, .my-alert { margin-bottom: 16px; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.my-notice { background: var(--ok-tint); color: #05603A; border: 1px solid #ABEFC6; }
.my-alert { background: var(--danger-tint); color: var(--danger); border: 1px solid #FECDCA; font-weight: 700; }

/* ---- 翌月の配分 ---- */
.my-plan__summary { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; margin: 0 -16px 16px; padding: 12px 16px; background: rgba(247, 245, 243, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.my-plan__summary b { font-size: 26px; color: var(--ink); }
.my-plan__summary span { color: var(--ink-3); }
.my-plan__remaining { text-align: right; }
.my-plan__remaining b { color: var(--brand-dark); }
.my-meter { grid-column: 1 / -1; height: 8px; border-radius: 9999px; background: var(--line); overflow: hidden; }
.my-meter span { display: block; height: 100%; width: var(--fill, 0%); background: var(--brand); transition: width .2s ease; }
.my-plan.is-over .my-meter span { background: var(--danger); }
.my-plan.is-over .my-plan__remaining b { color: var(--danger); }
.my-plan__over { grid-column: 1 / -1; color: var(--danger); font-size: 13px; font-weight: 700; }
.my-plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.my-plan__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.my-plan__name { font-weight: 700; }
.my-plan__pt { display: inline-block; margin-top: 2px; padding: 0 10px; border-radius: 9999px; background: var(--accent); font-size: 12px; font-weight: 700; }
.my-plan__detail { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.my-plan__detail summary { cursor: pointer; color: var(--ink-3); }
.my-plan__detail p { margin-top: 6px; }
.my-plan__qty { display: grid; grid-template-columns: 40px 56px 40px; grid-template-rows: auto auto; align-items: center; gap: 4px; }
.my-plan__qty input { width: 56px; height: 40px; padding: 0; border: 1px solid #D5CDC6; border-radius: 8px; text-align: center; font: inherit; font-size: 18px; font-weight: 700; -moz-appearance: textfield; }
.my-plan__qty input::-webkit-outer-spin-button, .my-plan__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.my-step { width: 40px; height: 40px; border: 1px solid #D5CDC6; border-radius: 50%; background: var(--white); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.my-step:hover { border-color: var(--brand); color: var(--brand-dark); }
.my-plan__subtotal { grid-column: 1 / -1; text-align: center; color: var(--ink-3); font-size: 12px; }
.my-plan + .my-card { margin-top: 32px; }

/* ---- ログイン ---- */
.my-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.my-auth__card { width: 100%; max-width: 420px; padding: 32px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 24px rgba(43, 38, 34, 0.06); }
.my-auth__title { margin-bottom: 16px; font-size: 20px; text-align: center; }
.my-auth__note { margin-top: 16px; color: var(--ink-3); font-size: 13px; text-align: center; }
.my-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-3); font-size: 12px; }
.my-divider::before, .my-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- スマホ：ヘッダーを詰める ---- */
.my-header__store .my-link { white-space: nowrap; }
.my-auth__card .my-center + .my-form { margin-top: 20px; }
@media (max-width: 480px) {
  .my-logo span { display: none; }
  .my-header__store { font-size: 12px; gap: 10px; }
  .my-nav { gap: 0; padding: 0 4px; }
  .my-nav a { padding: 10px 10px; font-size: 13px; }
}
.my-plan__locked { margin: 0; padding: 0; border: 0; min-width: 0; }
.my-plan__locked .my-step { display: none; }
.my-plan__locked .my-plan__qty input { background: var(--bg); color: var(--ink-2); }
.my-message { margin-top: 12px; padding: 12px 14px; background: var(--white); border-left: 3px solid var(--brand); border-radius: 4px; white-space: pre-wrap; }
