/* Nihehe account page redesign: loaded LAST by account.html. Remove the <link> (or git revert) to roll back. */
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--font); }
a { color: var(--brand); }
.ac-main { max-width: 1100px; margin: 0 auto; padding: 32px 16px 72px; min-height: 60vh; }
.ac-rise { animation: nh-rise .4s var(--ease) both; }
.ac-sub { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.ac-small { font-size: 14px; }
.ac-center { text-align: center; margin: 16px 0 0; }
.ac-center a { font-weight: 700; }
.ac-eyebrow { margin: 0 0 8px; font: 800 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ac-stack { display: grid; gap: 12px; margin-bottom: 8px; }

/* ---------- Auth card ---------- */
.ac-auth { max-width: 460px; margin: 24px auto 0; padding: 32px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.ac-auth h1 { margin: 0 0 8px; font: 800 28px/1.2 var(--font); letter-spacing: -.01em; text-align: center; color: var(--brand); }
.ac-auth > .ac-sub { text-align: center; margin-bottom: 24px; }
.ac-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; background: var(--page); border-radius: var(--radius-pill); }
.ac-seg a { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--radius-pill); color: var(--muted); font: 700 15px/1 var(--font); text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.ac-seg a.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-card); }
.ac-seg a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.ac-done { text-align: center; padding: 12px 0; }
.ac-done-mark { width: 64px; height: 64px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #dcf5e6; color: #067647; animation: nh-rise .4s var(--ease) both; }

/* ---------- Fields ---------- */
.ac-field { margin-bottom: 16px; }
.ac-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-field label { display: block; margin-bottom: 8px; font: 700 14px/1.2 var(--font); color: var(--brand); }
.ac-field input, .ac-field select {
  width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--radius-field);
  background: var(--surface); color: var(--ink); font: 500 16px/1.2 var(--font); outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ac-field input[type="file"] { padding: 12px 16px; height: auto; }
.ac-field input:focus, .ac-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 174, 231, .18); }
.ac-pw { position: relative; }
.ac-pw input { padding-right: 76px; }
.ac-pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 60px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--brand); font: 700 14px/1 var(--font); cursor: pointer; }
.ac-pw-toggle:hover { background: var(--brand-light); }
.ac-pw-toggle:focus-visible { outline: 3px solid var(--accent); }
.ac-status { min-height: 20px; margin-top: 8px; font: 600 14px/1.4 var(--font); }
.ac-status.available { color: #067647; }
.ac-status.taken { color: var(--danger); }
.ac-status.checking { color: var(--muted); }
.ac-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ac-suggest button { min-height: 36px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--brand); font: 600 14px/1 var(--font); cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.ac-suggest button:hover { background: var(--brand-light); border-color: var(--accent); }
.ac-help { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Buttons ---------- */
.ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 1.5px solid transparent; border-radius: var(--radius-pill); font: 800 15px/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease); }
.ac-btn:active { transform: scale(.98); }
.ac-btn:focus-visible, .ac-close:focus-visible, .ac-stat:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ac-btn-primary { background: var(--brand); color: #fff; }
.ac-btn-primary:hover { background: var(--brand-dark); color: #fff; }
.ac-btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--line); }
.ac-btn-ghost:hover { background: var(--brand-light); border-color: var(--accent); }
.ac-btn-block { width: 100%; min-height: 52px; }
.ac-btn[disabled] { opacity: .55; cursor: wait; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* ---------- Messages ---------- */
.ac-alert { margin: 0 0 16px; padding: 14px 18px; border-radius: 16px; background: #fdeceb; color: var(--danger); font: 600 14px/1.5 var(--font); animation: nh-rise .25s var(--ease) both; }
.ac-notice { margin: 0 0 16px; padding: 14px 18px; border-radius: 16px; background: var(--brand-light); color: var(--brand); font: 600 14px/1.5 var(--font); }
.ac-notice--ok { background: #dcf5e6; color: #067647; }

/* ---------- Dashboard ---------- */
.ac-dash { display: block; }
.ac-hero { display: flex; align-items: center; gap: 20px; padding: 24px; margin-bottom: 20px; background: var(--brand); color: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.ac-hero .ac-eyebrow, .ac-hero .ac-sub { color: #b9cde3; }
.ac-hero h1 { margin: 0 0 4px; font: 800 28px/1.2 var(--font); letter-spacing: -.01em; overflow-wrap: anywhere; }
.ac-hero .ac-btn-primary { background: var(--accent); color: var(--brand); }
.ac-hero .ac-btn-primary:hover { background: #fff; color: var(--brand); }
.ac-hero-text { flex: 1; min-width: 0; }
.ac-avatar { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--brand); font: 800 26px/1 var(--font); }

.ac-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.ac-stat { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.ac-stat:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(19, 45, 76, .14); }
.ac-stat:nth-child(2) { animation-delay: .05s; } .ac-stat:nth-child(3) { animation-delay: .1s; } .ac-stat:nth-child(4) { animation-delay: .15s; }
.ac-stat-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: 50%; background: var(--brand-light); color: var(--brand); }
.ac-stat-label { font: 700 13px/1 var(--font); color: var(--muted); }
.ac-stat-value { font: 800 30px/1.2 var(--font); color: var(--brand); }
.ac-stat-value--sm { font-size: 20px; line-height: 1.5; }
.ac-stat-note { font-size: 14px; color: var(--muted); }

.ac-card { padding: 24px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); scroll-margin-top: 88px; }
.ac-card h2 { margin: 0 0 8px; font: 800 20px/1.3 var(--font); color: var(--brand); }
.ac-card > .ac-btn { margin-top: 16px; }
.ac-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ac-card-head .ac-sub { max-width: 640px; }
.ac-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--page); color: var(--brand); font-size: 24px; line-height: 1; cursor: pointer; }
.ac-close:hover { background: var(--brand-light); }
.ac-form-narrow { max-width: 560px; }
.ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ac-grid .ac-card { margin-bottom: 0; }

.ac-rating { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--brand-light); font: 800 18px/1 var(--font); color: var(--brand); }
.ac-reviews { display: grid; gap: 12px; }
.ac-review { padding: 16px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--page); }
.ac-review-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ac-review-stars { color: #b7791f; letter-spacing: 2px; }
.ac-review-comment { margin: 8px 0 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.ac-review-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.ac-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 15px; }

.ac-dl { margin: 12px 0 0; display: grid; gap: 12px; }
.ac-dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ac-dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.ac-dl dt { color: var(--muted); font-weight: 600; font-size: 15px; }
.ac-dl dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.ac-tips { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.ac-tips li + li { margin-top: 6px; }

@media (max-width: 900px) { .ac-summary { grid-template-columns: repeat(2, 1fr); } .ac-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .ac-main { padding: 20px 16px 56px; }
  .ac-auth { padding: 24px 16px; margin-top: 8px; }
  .ac-hero { flex-wrap: wrap; padding: 20px; }
  .ac-hero .ac-btn { width: 100%; }
  .ac-hero-text { flex: 1 1 calc(100% - 84px); }
  .ac-card { padding: 20px 16px; }
  .ac-summary { gap: 12px; }
  .ac-stat { padding: 16px; }
  .ac-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { .ac-rise, .ac-alert, .ac-done-mark { animation: none; } .ac-stat, .ac-btn { transition: none; } }
.ac-review { min-width: 0; }
.ac-review-top strong { min-width: 0; overflow-wrap: anywhere; }
.ac-review-stars { flex: none; }

/* ---------- Profile photo ---------- */
.ac-avatar-wrap { position: relative; flex: none; }
.ac-avatar { overflow: hidden; transition: opacity .2s var(--ease); }
.ac-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-avatar.is-busy { opacity: .5; }
.ac-avatar-edit { position: absolute; right: -4px; bottom: -4px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--brand); border-radius: 50%; background: #fff; color: var(--brand); cursor: pointer; transition: transform .15s var(--ease); }
.ac-avatar-edit:hover { transform: scale(1.08); }
.ac-avatar-edit:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ac-link-btn { min-height: 32px; margin-top: 4px; padding: 0; border: 0; background: none; color: #b9cde3; font: 700 14px/1 var(--font); text-decoration: underline; cursor: pointer; }
.ac-link-btn:hover { color: #fff; }
.ac-link-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* NH:BRAND-LOGO:START */
.ac-brand { display: block; width: min(240px, 72%); height: auto; margin: 0 auto 18px; }
/* NH:BRAND-LOGO:END */
