*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0D0D0D;
  --surface:  #1A1A1A;
  --surface2: #222222;
  --border:   rgba(255,255,255,.1);
  --orange:   #F5A623;
  --orange-hv:#E09415;
  --text:     #F0F0F0;
  --muted:    #888888;
  --green:    #4ADE80;
  --red:      #F87171;
  --radius:   8px;
  --shadow:   0 2px 16px rgba(0,0,0,.5);
}

body {
  font-family: 'Inter', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

/* =====================
   Layout
   ===================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================
   Header / Nav
   ===================== */
.site-header {
  background: #000;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  color: var(--orange);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}
.nav-links a:hover { color: var(--orange); }
.nav-logout { color: rgba(255,255,255,.35) !important; }

.nav-avatar-wrap { flex-shrink: 0; }
.nav-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--orange);
}
.nav-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--orange);
}

/* Footer */
.site-footer {
  background: #000;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0;
  text-align: center;
  margin-top: 60px;
}

/* =====================
   Auth pages
   ===================== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 8px;
  letter-spacing: .04em;
}
.auth-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-link { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-link a { color: var(--orange); text-decoration: none; }

/* =====================
   Forms
   ===================== */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  background: var(--surface2);
  color: var(--text);
  width: 100%;
}
.input:focus { border-color: var(--orange); }
.input::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 11px; color: var(--muted); }
.req { color: var(--red); font-size: 11px; }

/* =====================
   Buttons
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--orange); color: #000; }
.btn-primary:hover { background: var(--orange-hv); opacity: 1; }
.btn-outline  { background: transparent; color: var(--orange); border: 1px solid var(--orange); }
.btn-outline:hover { background: var(--orange); color: #000; opacity: 1; }
.btn-full     { width: 100%; }
.btn-sm       { padding: 6px 12px; font-size: 12px; }

/* =====================
   Alerts
   ===================== */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(248,113,113,.1); color: #F87171; border: 1px solid rgba(248,113,113,.3); }
.alert-success { background: rgba(74,222,128,.1);  color: #4ADE80; border: 1px solid rgba(74,222,128,.3); }

/* =====================
   Page title
   ===================== */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.empty-msg  { color: var(--muted); font-size: 14px; padding: 16px 0; }

/* =====================
   Dashboard
   ===================== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s;
}
.dash-card:hover { border-color: var(--orange); }
.dash-card-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: rgba(245,166,35,.15);
  color: var(--orange);
}
.dash-card-title { font-weight: 600; font-size: 14px; color: var(--text); }
.dash-card-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dash-card > .btn { margin-left: auto; flex-shrink: 0; }

/* =====================
   Search
   ===================== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.search-input { flex: 1; }
.search-count { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  gap: 14px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  border-top: 3px solid var(--card-accent, var(--orange));
  transition: border-color .2s, background .2s;
}
.member-card:hover { background: var(--surface2); }
.member-card-avatar img,
.member-card-avatar .avatar-placeholder {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #000;
  flex-shrink: 0;
}
.member-card-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.member-card-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.member-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* =====================
   Tags
   ===================== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}
.tag-soft {
  background: rgba(255,255,255,.08);
  color: var(--muted);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* =====================
   Profile page
   ===================== */
.profile-view { background: var(--bg); }
.profile-banner {
  height: 200px;
  position: relative;
  overflow: visible;
  background: #111;
}
.profile-banner-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
}
/* アバターをバナー左下にabsolute配置 */
.profile-avatar-abs {
  position: absolute;
  bottom: -45px;
  left: 24px;
  z-index: 10;
}
.profile-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--orange);
  display: block;
  background: var(--surface);
}
.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #000;
}
.profile-container {
  margin-top: 0;
  padding-top: 0;
}
/* 名前ブロックはアバター分だけ下げる */
.profile-name-block {
  padding: 56px 4px 20px;
}
.profile-name     { font-size: 22px; font-weight: 700; color: var(--text); }
.profile-location { font-size: 13px; color: var(--muted); margin-top: 4px; }

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.profile-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--orange);
}
.profile-bio { font-size: 14px; line-height: 1.9; white-space: pre-line; color: var(--text); }

.contact-list   { display: flex; flex-direction: column; gap: 12px; }
.contact-item   { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.contact-label  { font-size: 11px; font-weight: 700; color: var(--muted); width: 80px; flex-shrink: 0; letter-spacing: .05em; text-transform: uppercase; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.video-item-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: .05em; text-transform: uppercase; }

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.login-prompt {
  text-align: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
}
.login-prompt p { margin-bottom: 14px; }

/* =====================
   Edit page
   ===================== */
.edit-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.edit-section-title { font-size: 15px; font-weight: 700; margin-bottom: 18px; color: var(--text); }

.image-upload-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.image-upload-block { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.avatar-preview, .banner-preview {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.avatar-preview {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid var(--orange);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.banner-preview {
  width: 100%;
  max-width: 400px;
  height: 100px;
}
.banner-preview img { width: 100%; height: 100%; object-fit: cover; }
.banner-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted);
}
.upload-btn { cursor: pointer; }

.color-picker { display: flex; flex-wrap: wrap; gap: 12px; }
.color-option { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.color-option input { display: none; }
.color-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: border-color .15s;
}
.color-option input:checked + .color-dot { border-color: #fff; }
.color-label { font-size: 12px; color: var(--muted); }
