/* =========================================================
   Otokara — Profile (mock v0.2)
   Same tokens and components as the event pages. Layout borrows
   the photo-first, top-to-bottom reading order of dating-app
   profiles, but stays light, flat and action-free (no like / swipe).
   The only gradient is the photo scrim that keeps the name legible.
   ========================================================= */

/* ---------- Photo hero ---------- */
.pf-hero { position: relative; aspect-ratio: 4 / 5; max-height: 78svh; width: 100%; overflow: hidden; background: var(--c-surface); }
.pf-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .32), transparent 16%),
    linear-gradient(to top, rgba(0, 0, 0, .66), rgba(0, 0, 0, .26) 24%, transparent 44%);
}
.pf-photos, .pf-track { height: 100%; }
.pf-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: pointer; }
.pf-track::-webkit-scrollbar { display: none; }
.pf-track:focus-visible { outline-offset: -4px; }
.pf-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.pf-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.pf-bars { position: absolute; z-index: 2; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; pointer-events: none; }
.pf-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .45); transition: background-color var(--d-fast); }
.pf-bars i.on { background: var(--c-white); }
.pf-nav { display: none; }
.pf-hero__tools { position: absolute; z-index: 3; top: 24px; left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.pf-hero__tools > * { pointer-events: auto; }
.pf-glass-btn { background: var(--c-photo-scrim); color: var(--c-white); min-height: 40px; }
.pf-hero__id { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 20px; color: var(--c-white); pointer-events: none; }
.pf-hero__id h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pf-hero__pref { font-size: 1.0625rem; font-weight: var(--w-bold); letter-spacing: 0; white-space: nowrap; }
.pf-hero__id h1 .kari { vertical-align: 3px; }

/* No photo yet */
.pf-hero--empty { background: var(--c-surface-2); }
.pf-hero--empty::after { display: none; }
.pf-hero--empty .pf-hero__tools .icon-btn--glass { background: var(--c-bg); color: var(--c-ink); }
.pf-hero--empty .pf-hero__tools .pf-glass-btn { background: var(--c-bg); color: var(--c-ink); }
.pf-ph-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s-4); padding-bottom: 64px; }
.pf-ph-empty__icon { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; background: #d6d6d6; color: #a3a3a3; display: block; }
.pf-hero--empty .pf-hero__id { color: var(--c-ink); }

/* ---------- Body ---------- */
.pf-body { max-width: 600px; margin-inline: auto; padding: var(--s-6) var(--gutter) 0; display: grid; gap: var(--s-10); }
.pf-quote-wrap { display: grid; gap: 6px; }
.pf-quote-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 24px; }
.pf-quote-lb { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink-2); }
.pf-quote-lb .icon { width: 18px; height: 18px; }
.pf-quote { font-size: 1.0625rem; font-weight: var(--w-bold); line-height: 1.75; color: var(--c-ink); overflow-wrap: anywhere; }
.pf-sec { display: grid; gap: var(--s-4); min-width: 0; }
.pf-sec__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 40px; }
.pf-sec__head h2 { font-size: 1.25rem; }
.pf-edit { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: var(--c-surface); color: var(--c-ink); font-size: var(--t-sm); font-weight: var(--w-bold); cursor: pointer; flex: none; }
.pf-edit:hover { background: var(--c-surface-2); }
.pf-edit .icon { width: 16px; height: 16px; }
.pf-text { font-size: var(--t-base); line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; color: var(--c-ink); }
.pf-text--card { background: var(--c-surface); border-radius: var(--r-md); padding: var(--s-5); }
.pf-grp { display: grid; gap: 10px; }
.pf-grp h3, .pf-music__grp h3 { font-size: var(--t-md); font-weight: var(--w-bold); color: var(--c-ink-2); letter-spacing: 0; }

/* Tags */
.pf-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pf-tag { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 14px; border-radius: var(--r-pill); background: var(--c-surface); color: var(--c-ink); font-size: var(--t-md); font-weight: var(--w-bold); line-height: 1.3; }
.pf-tag--lg { min-height: 40px; font-size: var(--t-base); }
.pf-tag--line { background: transparent; border: 1.5px solid var(--c-brand-ink); color: var(--c-brand-ink); }

/* Music: the one tinted panel on the page */
.pf-sec--music .pf-sec__head h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c-brand); margin-right: 8px; vertical-align: 3px; }
.pf-music { background: var(--c-brand-tint); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: var(--s-6); }
.pf-music__grp { display: grid; gap: 10px; }
.pf-music .pf-tag--lg { background: var(--c-bg); }

/* Label / answer rows */
.pf-rows { border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-1) var(--s-5); }
.pf-row { display: grid; grid-template-columns: minmax(5.5em, auto) minmax(0, 1fr); gap: var(--s-4); align-items: baseline; padding-block: 14px; border-bottom: 1px solid var(--c-line); }
.pf-row:last-child { border-bottom: 0; }
.pf-row dt { font-size: var(--t-md); color: var(--c-ink-2); font-weight: var(--w-body); white-space: nowrap; }
.pf-row dd { font-size: var(--t-base); font-weight: var(--w-bold); text-align: right; overflow-wrap: anywhere; line-height: 1.5; }


/* Activity */
.pf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.pf-stats > div { display: grid; gap: 2px; padding: var(--s-4); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.pf-stats span { display: flex; align-items: center; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink-2); }
.pf-stats b { font-size: 1.75rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.pf-stats b small { font-size: var(--t-base); margin-left: 2px; }
.pf-stats .pf-rank { font-size: 1.25rem; line-height: 1.75; }
.mini-card--static { cursor: default; }
.mini-card--static:hover h3 { text-decoration: none; }

/* Own page only */
.pf-private { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--c-surface); font-size: var(--t-xs); font-weight: var(--w-bold); white-space: nowrap; }
.pf-private .icon { width: 14px; height: 14px; }
.pf-answer { font-size: var(--t-base); font-weight: var(--w-bold); }
.pf-none { display: grid; justify-items: start; gap: var(--s-3); }
.pf-muted { color: var(--c-ink-2); font-size: var(--t-md); }
.pf-add { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: var(--s-3); align-items: center; padding: var(--s-4); border: 1.5px dashed var(--c-line-2); border-radius: var(--r-md); background: var(--c-bg); text-align: left; cursor: pointer; }
.pf-add:hover { border-color: var(--c-ink); }
.pf-add b { display: block; font-size: var(--t-base); }
.pf-add small { display: block; font-size: var(--t-sm); color: var(--c-ink-2); line-height: 1.5; }
.pf-add__ic, .pf-hub__ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); }
.pf-add__ic .icon, .pf-hub__ic .icon { width: 20px; height: 20px; }
.pf-own { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5) var(--s-5); border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.pf-own__btns { display: grid; gap: var(--s-2); }
.pf-meter { display: grid; gap: var(--s-2); }
.pf-meter__row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-md); }
.pf-meter__row span b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pf-meter__bar { height: 8px; border-radius: 4px; background: var(--c-surface-2); overflow: hidden; }
.pf-meter__bar i { display: block; height: 100%; border-radius: 4px; background: var(--c-brand-ink); transition: width var(--d-slow) var(--ease-out); }
.pf-preview-bar { position: sticky; z-index: 39; top: calc(env(safe-area-inset-top, 0px) + 61px); display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 10px var(--gutter); background: var(--c-ink); color: var(--c-white); font-size: var(--t-sm); }
.pf-preview-bar span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pf-preview-bar .icon { width: 18px; height: 18px; }
.pf-preview-bar .btn { flex: none; }

/* Block / report: quiet, at the very end */
.pf-report { display: flex; justify-content: center; gap: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--c-line); }
.pf-report button { min-height: 44px; border: 0; background: none; padding: 0 4px; font-size: var(--t-md); font-weight: var(--w-body); color: var(--c-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pf-report button:hover { color: var(--c-ink); }

/* ---------- Edit hub ---------- */
.pf-hub { border-top: 1px solid var(--c-line); }
.pf-hub button { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: var(--s-3); align-items: center; min-height: 76px; padding: var(--s-3) 0; border: 0; border-bottom: 1px solid var(--c-line); background: none; text-align: left; cursor: pointer; }
.pf-hub button:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pf-hub__tx { display: grid; gap: 4px; }
.pf-hub__tx b { display: flex; align-items: center; flex-wrap: wrap; font-size: var(--t-base); }
.pf-hub__thumbs { display: flex; gap: 4px; }
.pf-hub__thumbs img { width: 32px; height: 40px; border-radius: 4px; object-fit: cover; }
.pf-st { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--c-ink-2); }
.pf-st .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.pf-st--done { color: var(--c-ok); }
.pf-st--empty { color: var(--c-brand-ink); }
.pf-st--empty::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pf-req { font-style: normal; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: 4px; background: var(--c-brand-ink); color: var(--c-white); font-size: 11px; font-weight: var(--w-bold); line-height: 1; }

/* ---------- Section editor (sheet) ---------- */
.pf-form .field .lb { font-size: var(--t-md); }
.pf-form .field .lb > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-form .field .lb > span small { margin-left: 0; }
.pf-form .toggle-chips .chip { height: 44px; font-size: var(--t-md); }
.pf-ta { height: auto; padding: 12px var(--s-4); line-height: 1.7; resize: vertical; min-height: 96px; }
.pf-ta--line { min-height: 0; resize: none; } /* ひとこと: 3 rows show all 40 characters */
.pf-fixed { display: grid; gap: 2px; padding: 12px var(--s-4); background: var(--c-surface); border-radius: var(--r-sm); }
.pf-fixed span { font-size: var(--t-sm); color: var(--c-ink-2); }
.pf-tags--edit:empty { display: none; }
.pf-tags--edit li { padding-right: 4px; }
.pf-tags--edit button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--c-ink); }
.pf-tags--edit button:hover { background: var(--c-surface-2); }
.pf-tags--edit .icon { width: 16px; height: 16px; }
.pf-form__foot { position: sticky; bottom: calc(var(--s-6) * -1 - env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--s-2); margin-inline: calc(var(--gutter) * -1); padding: var(--s-3) var(--gutter) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); margin-bottom: calc(var(--s-6) * -1 - env(safe-area-inset-bottom, 0px)); background: var(--c-bg); border-top: 1px solid var(--c-line); }
.pf-radios { display: grid; gap: var(--s-3); }
.pf-radios .check { font-size: var(--t-base); align-items: center; }
.jump .jump--danger span { color: var(--c-danger); }
.jump .jump--danger b { background: var(--c-brand-tint); color: var(--c-danger); }

/* ---------- Photo editor ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.ph-slot { aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; position: relative; }
.ph-slot--main { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.ph-slot button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--c-surface); cursor: pointer; position: relative; }
.ph-slot img { width: 100%; height: 100%; object-fit: cover; }
.ph-slot__n { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--c-ink); color: var(--c-white); font-size: var(--t-xs); font-weight: var(--w-bold); }
.ph-slot--main .ph-slot__n { background: var(--c-brand-ink); }
.ph-slot__more { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c-photo-scrim); color: var(--c-white); }
.ph-slot__more .icon { width: 18px; height: 18px; }
.ph-slot--add label { height: 100%; display: grid; place-content: center; justify-items: center; gap: 4px; border: 2px dashed var(--c-line-2); border-radius: var(--r-md); background: var(--c-bg); cursor: pointer; font-size: var(--t-sm); font-weight: var(--w-bold); text-align: center; padding: 4px; }
.ph-slot--add label:hover { border-color: var(--c-ink); }
.ph-slot--add label:focus-within { outline: 3px solid var(--c-ink); outline-offset: 2px; }
.ph-slot--add .icon { width: 28px; height: 28px; }
.ph-slot--empty span { display: block; height: 100%; border: 1.5px dashed var(--c-line); border-radius: var(--r-md); }
.ph-tips { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--c-surface); border-radius: var(--r-md); }
.ph-tips li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: var(--t-md); line-height: 1.7; }
.ph-tips .icon { width: 20px; height: 20px; color: var(--c-brand-ink); margin-top: 3px; stroke-width: 2.4; }
.ph-sheet-img { width: 160px; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; margin-inline: auto; }
.ph-sheet-img img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 480px) {
  .pf-own__btns { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .pf-hero { width: min(560px, calc(100% - var(--gutter) * 2)); margin: var(--s-6) auto 0; border-radius: var(--r-lg); max-height: none; }
  .pf-body { max-width: 624px; padding-top: var(--s-8); }
}
@media (min-width: 1024px) {
  .pf-nav { display: grid; position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); }
  .pf-nav:active { transform: translateY(-50%) scale(.94); }
  .pf-nav--prev { left: 12px; }
  .pf-nav--next { right: 12px; }
  .pf-nav[disabled] { opacity: 0; pointer-events: none; }
}
