/* マイページ /account/ と下層（22 の 7 章・R.7・8.4〜8.6）。灰白。墨の板は使わない（23 の D2）。
   987 から 3 : 5（左に楽屋札と案内、右に名札・h1・中身）。986 までは楽屋札を上に、案内は横の選択肢 */
@layer page {
  .my { padding-top: var(--es-space-55); padding-bottom: var(--es-space-144); }
  .my-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--es-gutter); }
  .my-side { grid-column: 1 / span 3; align-self: start; position: sticky; top: calc(var(--hh) + var(--es-space-34)); min-width: 0; padding-right: var(--es-space-34); }
  .my-main { grid-column: 4 / span 5; min-width: 0; }
  .my-h1 { font-size: var(--es-text-42); line-height: var(--es-lh-42); margin-bottom: var(--es-space-34); }
  html:not([data-auth="guest"]) .my-h1--home { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .my-guest, .my--home > [data-auth="guest"] { max-width: 610px; }
  .my-noname { margin-bottom: var(--es-space-34); font-size: var(--es-text-16); line-height: var(--es-lh-16); display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-13); }
  .my-demo { margin-top: var(--es-space-89); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); max-width: 42em; }

  /* 本人のしるし（審査待ちの画像＋円の下に札。8.5） */
  .my-mark { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--es-space-8); }
  .my-mark__img { width: var(--s); height: var(--s); border-radius: 50%; object-fit: cover; background: var(--es-color-keshizumi); outline: var(--es-line-1) solid var(--es-rule); outline-offset: calc(var(--es-line-1) * -1); }
  .my-mark > .mark[hidden] { display: none; }
  .my-pend { gap: var(--es-space-5); }
  .my-sig { display: inline-block; border-radius: 50%; color: inherit; text-decoration: none; }
  .my-sig:focus-visible { outline: var(--es-line-2) solid var(--es-focus); outline-offset: var(--es-space-5); }
  .pf-sig .my-mark__img { width: 233px; height: 233px; }
  @media (max-width: 1259px) { .pf-sig .my-mark__img { width: 144px; height: 144px; } }
  @media (max-width: 986px) { .pf-sig .my-mark__img { width: 89px; height: 89px; } }

  /* 楽屋札（R.7） */
  .my-karte { display: flex; align-items: flex-start; gap: var(--es-space-13); padding: var(--es-space-21) 0; border-top: var(--es-line-1) solid var(--es-rule); border-bottom: var(--es-line-1) solid var(--es-rule); margin-bottom: var(--es-space-34); }
  .my-karte__t { min-width: 0; }
  .my-karte__n { display: flex; align-items: center; gap: var(--es-space-8); font-size: var(--es-text-21); line-height: var(--es-lh-21); font-weight: var(--es-fw-bold); overflow-wrap: anywhere; }
  .my-karte .tlink { margin-top: var(--es-space-5); }

  /* 案内 7 つ（7.1） */
  .my-nav ul { border-top: var(--es-line-1) solid var(--es-rule); }
  .my-nav__a { position: relative; display: flex; align-items: center; gap: var(--es-space-8); min-height: 55px; border-bottom: var(--es-line-1) solid var(--es-rule); color: var(--es-text-strong); text-decoration: none; font-size: var(--es-text-16); line-height: var(--es-lh-16); font-weight: var(--es-fw-medium); }
  .my-nav__a[data-on] > span:first-child { font-weight: var(--es-fw-bold); box-shadow: inset 0 calc(var(--es-line-2) * -1) 0 var(--es-accent); }
  .my-nav__a:focus-visible { outline: var(--es-line-2) solid var(--es-focus); outline-offset: var(--es-space-3); }
  @media (hover: hover) and (pointer: fine) { .my-nav__a:hover > span:first-child { text-decoration: underline; text-underline-offset: 0.25em; } }
  .my-nav__dot[hidden] { display: none; }
  .my-out { margin-top: var(--es-space-21); }
  .my-out .tlink { font-size: var(--es-text-13); color: var(--es-text-sub); }

  /* ホーム（7.3・R.7）：本人向けの名乗りの面 → 3 : 5 */
  .my--home { padding-top: 0; }
  .my-top { padding-left: 0; padding-right: 0; padding-bottom: var(--es-space-144); }
  .my-top .pf-h1 { font-weight: var(--es-fw-bold); color: var(--es-text-strong); }
  .my-top .pf-body { align-items: start; }
  .my-setup { margin-top: var(--es-space-89); }
  .my-setup__a { min-height: 55px; }
  .my-setup__k { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); margin-bottom: var(--es-space-5); }
  .my-setup__v { display: flex; align-items: center; gap: var(--es-space-8); font-size: var(--es-text-16); line-height: var(--es-lh-16); font-weight: var(--es-fw-medium); }
  .my-setup__v > .ico:first-child, .my-setup__a [data-v-done] { display: none; }
  .my-setup__a.is-done .my-setup__v { color: var(--es-text-sub); }
  .my-setup__a.is-done .my-setup__v > .ico:first-child, .my-setup__a.is-done [data-v-done] { display: inline; }
  .my-setup__a.is-done [data-v-todo], .my-setup__a.is-done .my-setup__v > .ico:last-child { display: none; }
  @media (max-width: 609px) { .my-setup__a { flex-direction: column; align-items: flex-start; } .my-setup__k { display: block; } }

  .my-sec { margin-top: var(--es-space-89); }
  .my-sec--first, .my-me > .my-sec:first-child { margin-top: 0; }
  .my-h2row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: var(--es-space-21); margin-bottom: var(--es-space-21); }
  .my-h2 { font-size: var(--es-text-26); line-height: var(--es-lh-26); }
  .my-empty { font-size: var(--es-text-16); line-height: var(--es-lh-16); color: var(--es-text-sub); margin-bottom: var(--es-space-21); }
  .my-p { font-size: var(--es-text-16); line-height: var(--es-lh-16); margin-top: var(--es-space-13); max-width: 42em; }
  .my-sub { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .my-ul { margin-top: var(--es-space-13); padding-left: 1.2em; list-style: disc; font-size: var(--es-text-16); line-height: var(--es-lh-16); }
  .my-wall { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 0; }
  @media (max-width: 609px) { .my-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

  /* 通知の行（7.5） */
  .my-notes { border-top: var(--es-line-1) solid var(--es-rule); }
  .my-note__a { display: flex; align-items: center; gap: var(--es-space-13); min-height: 68px; padding: var(--es-space-8) 0; border-bottom: var(--es-line-1) solid var(--es-rule); color: var(--es-text-strong); text-decoration: none; }
  .my-note__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
  .my-note.is-unread .my-note__dot { background: var(--es-accent); }
  .my-note__t { flex: 1 1 auto; min-width: 0; font-size: var(--es-text-16); line-height: var(--es-lh-16); }
  .my-note.is-unread .my-note__t { font-weight: var(--es-fw-medium); }
  .my-note__t b { font-weight: var(--es-fw-bold); }
  .my-note__time { flex: 0 0 auto; font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  @media (hover: hover) and (pointer: fine) { .my-note__a:hover .my-note__t { text-decoration: underline; text-underline-offset: 0.25em; } }
  .my-readall { display: flex; align-items: center; flex-wrap: wrap; gap: var(--es-space-13); margin-bottom: var(--es-space-13); }
  .my-kinds { border-top: var(--es-line-1) solid var(--es-rule); }
  .my-kind__l { display: flex; align-items: center; justify-content: space-between; gap: var(--es-space-21); min-height: 55px; border-bottom: var(--es-line-1) solid var(--es-rule); font-size: var(--es-text-16); line-height: var(--es-lh-16); cursor: pointer; }
  div.my-kind__l { cursor: default; }
  .my-kind__lock { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .my-kind__l input:checked + .check__box { background: var(--es-accent); border-color: var(--es-accent); color: var(--es-on-accent); }
  .my-kind__l input:focus-visible + .check__box { outline: var(--es-line-2) solid var(--es-focus); outline-offset: 2px; }
  .my-kind__l .check__box { margin-top: 0; }

  /* 作品の行（クリエイター） */
  .my-works { border-top: var(--es-line-1) solid var(--es-rule); }
  .my-work { display: flex; align-items: center; gap: var(--es-space-13); min-height: 68px; padding: var(--es-space-8) 0; color: var(--es-text-strong); text-decoration: none; min-width: 0; }
  .my-works .my-work { border-bottom: var(--es-line-1) solid var(--es-rule); }
  .my-work img { width: 89px; height: 50px; object-fit: cover; flex: 0 0 auto; background: var(--es-color-keshizumi); }
  .my-work__n { font-size: var(--es-text-16); line-height: var(--es-lh-16); font-weight: var(--es-fw-bold); min-width: 0; overflow-wrap: anywhere; }

  /* プロフィールの編集（7.4）：右 5 列を 3 : 2。左＝入力の面（白熱・角 13・内側 34）、右＝見本の窓（R.7） */
  .my-edit { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--es-gutter); align-items: start; }
  .my-form { background: var(--es-surface); border-radius: var(--es-radius-l); padding: var(--es-space-34); display: flex; flex-direction: column; gap: var(--es-space-21); }
  .my-form .input { min-height: 55px; border-radius: var(--es-radius-m); font-size: var(--es-text-16); }
  .my-form .input--area { min-height: calc(26px * 4 + 26px); }
  .my-field .field__label { display: block; margin-bottom: var(--es-space-8); }
  .my-icon { display: flex; align-items: flex-start; gap: var(--es-space-21); }
  .my-icon__t { min-width: 0; display: flex; flex-direction: column; gap: var(--es-space-8); }
  .my-icon__btns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--es-space-13); }
  .my-file { cursor: pointer; }
  .my-file:focus-within { outline: var(--es-line-2) solid var(--es-focus); outline-offset: var(--es-space-3); }
  .my-handle { display: flex; align-items: center; gap: var(--es-space-8); }
  .my-handle__pre { font-family: var(--es-font-mono); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); white-space: nowrap; }
  .my-handle .input { font-family: var(--es-font-mono); flex: 1 1 auto; min-width: 0; }
  .my-save { display: flex; align-items: center; flex-wrap: wrap; gap: var(--es-space-21); margin-top: var(--es-space-13); }
  .my-saved { font-size: var(--es-text-16); line-height: var(--es-lh-16); font-weight: var(--es-fw-medium); }
  .my-seen { position: sticky; top: calc(var(--hh) + var(--es-space-34)); display: flex; flex-direction: column; align-items: flex-start; gap: var(--es-space-8); }
  .my-win { width: 100%; border: var(--es-line-1) solid var(--es-rule); border-radius: var(--es-radius-l); padding: var(--es-space-21); display: flex; flex-direction: column; align-items: flex-start; gap: var(--es-space-5); }
  .my-win__n { display: flex; align-items: center; gap: var(--es-space-8); margin-top: var(--es-space-13); font-size: var(--es-text-26); line-height: var(--es-lh-26); font-weight: var(--es-fw-bold); overflow-wrap: anywhere; min-width: 0; }
  .my-win__bio { margin-top: var(--es-space-8); font-size: var(--es-text-16); line-height: var(--es-lh-16); white-space: pre-line; overflow-wrap: anywhere; }
  .my-win__f { margin-top: var(--es-space-13); pointer-events: none; }
  .my-win--mini { max-width: 377px; }
  .my-win__links { display: flex; flex-wrap: wrap; column-gap: var(--es-space-21); }
  @media (max-width: 1259px) { .my-edit { grid-template-columns: minmax(0, 1fr); } .my-seen { position: static; } }
  @media (max-width: 609px) { .my-form { padding: var(--es-space-21); } .my-icon { flex-direction: column; } }

  /* 切り抜きの画面（8.6）：610 から中央の面（幅 610）、609 まで全面 */
  .crop { --crop-bg: var(--es-color-sumi); --crop-line: var(--es-color-hakunetsu); width: min(610px, 100vw); max-width: 100vw; max-height: 100dvh; padding: var(--es-space-34); border: 0; border-radius: var(--es-radius-l); background: var(--es-color-hakunetsu); color: var(--es-color-sumi); overflow-y: auto; }
  .crop::backdrop { background: var(--es-color-sumi); }
  .crop__h { font-size: var(--es-text-26); line-height: var(--es-lh-26); }
  .crop__area { margin-top: var(--es-space-21); width: 377px; max-width: 100%; aspect-ratio: 1; background: var(--es-color-sumi); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
  .crop__area:focus-visible { outline: var(--es-line-2) solid var(--es-focus); outline-offset: var(--es-space-3); }
  .crop__area canvas { display: block; width: 100%; height: 100%; }
  .crop__tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--es-space-8); margin-top: var(--es-space-21); }
  .crop__range { flex: 1 1 120px; accent-color: var(--es-color-yoi); }
  .crop__pk { margin-top: var(--es-space-34); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .crop__pv { display: flex; flex-wrap: wrap; gap: var(--es-space-13); margin-top: var(--es-space-8); }
  .crop__pvrow { display: flex; align-items: center; gap: var(--es-space-13); padding: var(--es-space-13); border-radius: var(--es-radius-m); background: var(--es-color-kaihaku); }
  .crop__pvrow--dark { background: var(--es-color-sumi); }
  .crop__c { border-radius: 50%; }
  .crop__act { display: flex; flex-wrap: wrap; gap: var(--es-space-13); margin-top: var(--es-space-34); }
  @media (max-width: 609px) { .crop { width: 100vw; height: 100dvh; border-radius: 0; padding: var(--es-space-21); } .crop__area { width: 100%; } }

  /* つながり（M05） */
  .my-tabs { display: flex; flex-wrap: wrap; gap: var(--es-space-8); margin-bottom: var(--es-space-21); }
  .my-search { position: relative; display: flex; align-items: center; margin-bottom: var(--es-space-21); }
  .my-search > .ico { position: absolute; left: var(--es-space-13); color: var(--es-text-sub); pointer-events: none; }
  .my-search .input { min-height: 44px; padding-left: calc(var(--es-space-13) * 2 + 20px); border-radius: var(--es-radius-m); }

  /* 設定（M07） */
  .my-range { border-top: var(--es-line-1) solid var(--es-rule); }
  .my-range__r { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--es-space-13); min-height: 68px; padding: var(--es-space-8) 0; border-bottom: var(--es-line-1) solid var(--es-rule); }
  .my-range__k { font-size: var(--es-text-16); line-height: var(--es-lh-16); }
  .my-range__c { display: flex; gap: var(--es-space-8); border: 0; margin: 0; padding: 0; }
  .my-chip { cursor: pointer; position: relative; }
  .my-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .my-chip:focus-within { outline: var(--es-line-2) solid var(--es-focus); outline-offset: var(--es-space-3); }
  .my-todata { margin-top: var(--es-space-144); }
  .my-rows { margin-top: 0; }
  .my-period { display: flex; flex-wrap: wrap; gap: var(--es-space-8); margin-bottom: var(--es-space-21); }

  /* クリエイター（M10） */
  .my-crtop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--es-space-34); align-items: start; }
  .my-crwrite { display: flex; flex-direction: column; align-items: flex-start; gap: var(--es-space-5); }
  .my-tablewrap { overflow-x: auto; }
  .my-table { width: 100%; border-collapse: collapse; font-size: var(--es-text-16); line-height: var(--es-lh-16); }
  .my-table th, .my-table td { padding: var(--es-space-8) var(--es-space-13) var(--es-space-8) 0; border-bottom: var(--es-line-1) solid var(--es-rule); text-align: left; vertical-align: middle; }
  .my-table thead th { font-size: var(--es-text-13); line-height: var(--es-lh-13); font-weight: var(--es-fw-medium); color: var(--es-text-sub); border-bottom-color: var(--es-text-strong); }
  .my-table td { font-size: var(--es-text-21); line-height: var(--es-lh-21); font-weight: var(--es-fw-bold); white-space: nowrap; }
  .my-table .my-work { min-height: 0; padding: 0; }
  @media (max-width: 986px) { .my-crtop { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 609px) {
    .my-table thead { display: none; }
    .my-table, .my-table tbody, .my-table tr, .my-table th, .my-table td { display: block; width: 100%; }
    .my-table tr { padding: var(--es-space-13) 0; border-bottom: var(--es-line-1) solid var(--es-rule); }
    .my-table th, .my-table td { border-bottom: 0; padding: var(--es-space-3) 0; }
    .my-table td { display: flex; justify-content: space-between; gap: var(--es-space-13); }
    .my-table td::before { content: attr(data-k); font-size: var(--es-text-13); line-height: var(--es-lh-21); font-weight: var(--es-fw-medium); color: var(--es-text-sub); }
  }

  /* 986 まで：楽屋札を上に、案内は横の選択肢（上に残る・横にスクロール） */
  @media (max-width: 986px) {
    .my { padding-top: var(--es-space-34); padding-bottom: var(--es-space-89); }
    .my-grid { grid-template-columns: minmax(0, 1fr); }
    .my-side, .my-main { grid-column: 1 / -1; position: static; padding-right: 0; }
    .my-karte { margin-bottom: 0; border-bottom: 0; }
    .my-nav { position: sticky; top: var(--hh); z-index: 20; background: var(--es-bg); margin: 0 calc(var(--es-margin) * -1) var(--es-space-34); padding: var(--es-space-8) var(--es-margin); border-bottom: var(--es-line-1) solid var(--es-rule); }
    .my-nav ul { display: flex; gap: var(--es-space-8); border: 0; overflow-x: auto; scrollbar-width: none; }
    .my-nav ul::-webkit-scrollbar { display: none; }
    .my-nav__a { min-height: 44px; padding: 0 var(--es-space-21); border: 0; border-radius: var(--es-radius-full); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-border); white-space: nowrap; }
    .my-nav__a[data-on] { background: var(--es-text-strong); color: var(--es-bg); box-shadow: none; }
    .my-nav__a[data-on] > span:first-child { box-shadow: none; }
    .my-out { display: none; }
    .my-h1 { font-size: var(--es-text-34); line-height: var(--es-lh-34); }
    .my-top { padding-bottom: var(--es-space-55); }
    .my-setup { margin-top: var(--es-space-55); }
  }
}
