/* ============================================
   Xオタクちゃん — polished creator site
   Desktop: fixed left rail + wide scroll content
   Mobile: clean stacked layout
============================================ */

:root {
  --accent: #ff6b9d;
  --accent-hover: #e85a8a;
  --accent-soft: #ffe8f0;
  --accent-line: #ffc2d6;
  --ink: #2c2438;
  --muted: #7a7088;
  --line: #efe6ec;
  --surface: #ffffff;
  --page: #faf6f8;
  --rail: #fff0f5;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(44, 36, 56, 0.06);
  --shadow-md: 0 8px 28px rgba(44, 36, 56, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'M PLUS Rounded 1c', system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* --------------------------------------------
   Mobile Header
-------------------------------------------- */
.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.m-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
  max-width: 560px;
  margin: 0 auto;
}

.m-logo {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.m-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.m-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 9px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.m-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.m-nav .m-cta {
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  padding: 6px 12px;
  margin-left: 4px;
}

/* --------------------------------------------
   Shell / Layout
-------------------------------------------- */
.shell {
  min-height: 100vh;
}

.side {
  display: none;
}

.content {
  min-height: 100vh;
}

/* --------------------------------------------
   Mobile Hero
-------------------------------------------- */
.m-hero {
  padding: 40px 20px 36px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.m-hero-inner {
  max-width: 400px;
  margin: 0 auto;
}

.m-avatar-ring {
  width: 104px;
  height: 104px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, var(--accent-line), #ffd0e0);
}

.m-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

.m-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.m-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.m-role {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.m-lead {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 22px;
}

.m-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  max-width: 240px;
  margin: 0 auto;
}

/* --------------------------------------------
   Buttons
-------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent-line);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------
   Content Blocks
-------------------------------------------- */
.block {
  padding: 48px 0;
  background: var(--page);
}

.block-alt {
  background: var(--rail);
}

.block-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.block-head {
  text-align: center;
  margin-bottom: 24px;
}

.block-head h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.block-head p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* --------------------------------------------
   Link list
-------------------------------------------- */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.link-row:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
}

.link-badge {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.link-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.link-badge.yt { background: #fff0f0; }
.link-badge.note { background: #e8faf5; }
.link-badge.note img { width: 22px; height: 22px; }
.link-badge.x { background: #f2f2f2; }

.link-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.link-text strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.link-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.link-go {
  color: #c8b8c4;
  font-size: 1rem;
  transition: color 0.15s, transform 0.15s;
}

.link-row:hover .link-go {
  color: var(--accent);
  transform: translateX(3px);
}

/* --------------------------------------------
   Contact
-------------------------------------------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}

.contact-item {
  margin-bottom: 18px;
}

.contact-item:last-of-type {
  margin-bottom: 0;
}

.contact-k {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.contact-v {
  display: inline-block;
  font-size: 0.88rem;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
}

.contact-note {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* --------------------------------------------
   Ask form
-------------------------------------------- */
.ask-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
}

.ask-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.ask-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fffcfd;
  resize: vertical;
  transition: border-color 0.15s;
}

.ask-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ask-meta {
  text-align: right;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 6px 0 14px;
}

.ask-privacy {
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.toast {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 14px;
}

.toast-success {
  background: #e8f6ee;
  color: #1f7a4a;
  border: 1px solid #b8e0c8;
}

.toast-error {
  background: #fff0f3;
  color: #c04060;
  border: 1px solid #ffc8d4;
}

/* --------------------------------------------
   Footer
-------------------------------------------- */
.content-foot {
  text-align: center;
  padding: 28px 20px 40px;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--page);
}

/* --------------------------------------------
   Admin (kept functional)
-------------------------------------------- */
.admin-body { background: var(--page); min-height: 100vh; }
.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 50;
}
.admin-header-inner {
  max-width: 760px; margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-logo { font-weight: 700; font-size: 1rem; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.badge { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.admin-actions { display: flex; gap: 6px; }
.admin-main { max-width: 760px; margin: 0 auto; padding: 24px 18px 48px; }
.admin-title { font-size: 1.15rem; margin-bottom: 18px; }
.admin-title .count { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.questions-list { display: flex; flex-direction: column; gap: 10px; }
.q-card { background: var(--surface); border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.q-card.unread { border-color: var(--accent-line); background: #fffafc; }
.q-card.starred { border-color: #ffd8a0; }
.q-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 8px; }
.q-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-id { font-weight: 700; color: var(--accent); font-size: 0.85rem; }
.q-date { font-size: 0.75rem; color: var(--muted); }
.q-badge { font-size: 0.68rem; padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.q-badge.new { background: var(--accent); color: #fff; }
.q-badge.star { background: #fff5e0; color: #c08020; }
.q-actions { display: flex; gap: 2px; }
.icon-btn { background: none; border: none; font-size: 1rem; cursor: pointer; padding: 3px 5px; border-radius: 6px; color: var(--muted); }
.icon-btn:hover { background: var(--accent-soft); }
.q-content { font-size: 0.92rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; margin-bottom: 10px; }
.q-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.read-label { font-size: 0.75rem; color: #90b0a0; }
.empty-state { text-align: center; padding: 40px 16px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); }
.empty-icon { font-size: 2.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }
.empty-sub { font-size: 0.82rem; margin-top: 4px; opacity: 0.8; }
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border-radius: 16px; padding: 28px 22px; border: 1px solid var(--line); }
.login-header { text-align: center; margin-bottom: 22px; }
.login-icon { font-size: 2rem; display: block; margin-bottom: 4px; }
.login-header h1 { font-size: 1.25rem; margin-bottom: 2px; }
.login-header p { color: var(--muted); font-size: 0.85rem; }
.login-form .form-group { margin-bottom: 14px; }
.login-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; }
.login-form input { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 0.92rem; }
.login-form input:focus { outline: none; border-color: var(--accent); }
.login-note { text-align: center; font-size: 0.74rem; color: var(--muted); margin-top: 14px; }

/* ============================================
   DESKTOP  (≥ 900px)
   Fixed left rail ~260–300px / wide content
============================================ */
@media (min-width: 900px) {

  /* PC表示を125%相当に */
  html {
    zoom: 1.25;
  }

  .m-header,
  .m-hero {
    display: none !important;
  }

  .shell {
    display: flex;
    min-height: 100vh;
  }

  /* Fixed left rail */
  .side {
    display: flex;
    flex-direction: column;
    width: 320px;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: var(--rail);
    border-right: 1px solid var(--line);
    z-index: 40;
  }

  .side-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 48px 28px 28px;
  }

  .side-profile {
    text-align: center;
    margin-bottom: 36px;
  }

  .side-avatar-ring {
    width: 112px;
    height: 112px;
    margin: 0 auto 18px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(145deg, var(--accent-line), #ffd0e0);
  }

  .side-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
  }

  .side-name {
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
  }

  .side-role {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 14px;
  }

  .side-bio {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.7;
  }

  .side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: auto;
  }

  .side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    transition: background 0.15s, color 0.15s;
  }

  .side-nav a:hover {
    background: var(--surface);
    color: var(--accent);
  }

  .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-line);
    flex-shrink: 0;
    transition: background 0.15s;
  }

  .side-nav a:hover .nav-dot {
    background: var(--accent);
  }

  .side-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 18px;
  }

  .side-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, transform 0.15s;
  }

  .side-socials a img {
    width: 18px;
    height: 18px;
    object-fit: contain;
  }

  .side-socials a.social-note img {
    width: 18px;
    height: 18px;
  }

  .side-socials a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }

  .side-copy {
    text-align: center;
    font-size: 0.7rem;
    color: var(--muted);
  }

  /* Wide content area */
  .content {
    margin-left: 320px;
    width: calc(100% - 320px);
    background: var(--page);
  }

  .block {
    padding: 64px 0;
  }

  .block-inner {
    max-width: 560px;
    padding: 0 32px;
  }

  .block-head h2 {
    font-size: 1.35rem;
  }

  .link-row {
    padding: 16px 18px;
  }

  .ask-form {
    padding: 28px 24px;
  }

  .content-foot {
    padding: 32px 28px 48px;
  }

  .ask-privacy {
    font-size: 0.78rem;
    letter-spacing: 0;
  }
}

/* Large screens — even wider content */
@media (min-width: 1200px) {
  .side {
    width: 340px;
  }

  .content {
    margin-left: 340px;
    width: calc(100% - 340px);
  }

  .side-body {
    padding: 56px 32px 32px;
  }

  .side-avatar-ring {
    width: 128px;
    height: 128px;
  }

  .block-inner {
    max-width: 600px;
    padding: 0 36px;
  }

  .content-foot {
    padding: 32px 36px 48px;
  }
}


/* Contact form extras */
.form-row {
  margin-bottom: 14px;
}
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-row input[type="text"],
.form-row input[type="email"] {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fffcfd;
}
.form-row input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Honeypot - hidden from humans */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}


.foot-links {
  margin-top: 10px;
  font-size: 0.78rem;
}
.foot-links a {
  color: var(--muted);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.legal-check {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.6;
}
.legal-check a {
  color: var(--accent);
  text-decoration: underline;
}
.ask-privacy a {
  color: var(--accent);
  text-decoration: underline;
}
