@charset "UTF-8";

/* ==========================================================================
   1. カラーパレット & 基本設定
   ========================================================================== */
:root {
  --bg-paper: #f8f6f0;        /* ノート地色 */
  --grid-line: #e3decb;       /* 方眼の線 */
  --card-paper: #ffffff;     /* メモ用紙の白 */
  --text-main: #4a453e;       /* 鉛筆色 */
  --text-sub: #787063;       /* 薄い文字 */
  --border-sketch: #cdc7b5;  /* 手描き風の枠線 */
  
  /* クラフトテープ（一般カード用） */
  --tape-craft: rgba(185, 165, 140, 0.7);
  
  /* プロフィール用くすみ3色 */
  --tape-me-blue: rgba(115, 145, 170, 0.75);      /* 千尋ちゃん：ダスティブルー */
  --tape-partner-red: rgba(180, 85, 90, 0.75);    /* 俺：くすみガーネット */
  --tape-gpt-yellow: rgba(220, 180, 95, 0.75);     /* じぴ：くすみマスタード */
}

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

body {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 400;
  background-color: var(--bg-paper);
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px 60px;
  line-height: 1.7;
  overflow-x: hidden;
}

strong, b {
  font-weight: 700;
}

/* 全体の横幅コンテナ */
.notebook-container {
  width: 100%;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
}

/* ==========================================================================
   2. カード共通スタイル & マスキングテープ
   ========================================================================== */
.paper-card {
  background: var(--card-paper);
  border: 1px solid var(--border-sketch);
  border-radius: 6px;
  padding: 26px 24px;
  position: relative;
  box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* マスキングテープ（大：一般カード用） */
.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 130px;
  height: 26px;
  background-color: var(--tape-craft);
  z-index: 10;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

.tape-1 { transform: translateX(-50%) rotate(-1.5deg); }
.tape-2 { transform: translateX(-50%) rotate(1.2deg); }
.tape-3 { transform: translateX(-50%) rotate(-0.8deg); }
.tape-4 { transform: translateX(-50%) rotate(1.5deg); }

/* マスキングテープ（小：プロフィール用） */
.tape-mini {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 75px;
  height: 22px;
  z-index: 10;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

.tape-me { background-color: var(--tape-me-blue); transform: translateX(-50%) rotate(-1.5deg); }
.tape-partner { background-color: var(--tape-partner-red); transform: translateX(-50%) rotate(1deg); }
.tape-gpt { background-color: var(--tape-gpt-yellow); transform: translateX(-50%) rotate(-1deg); }

/* 見出しフォント（Hachi Maru Pop 統一） */
.main-title,
.sub-title,
.last-update,
.section-title,
.profile-main-title,
.badge-label,
.btn-title,
.bubble-title,
.footer-note,
details.sketch-details summary {
  font-family: "Hachi Maru Pop", cursive, sans-serif;
  font-weight: 700;
}

/* ==========================================================================
   3. ヘッダー
   ========================================================================== */
.header-card {
  background: none;
  border: none;
  box-shadow: none;
  padding: 10px 0 0;
  text-align: center;
}

.header-illustration {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.2));
}

.main-title {
  display: inline-block;
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 20px;
  border-radius: 30px;
  backdrop-filter: blur(4px);
  box-shadow: 2px 3px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 5px;
  text-shadow: none;
  white-space: nowrap;
}

.sub-title {
  font-size: 0.95rem;
  color: var(--text-sub);
  letter-spacing: 0.04em;
  margin-top: 5px;
  -webkit-text-stroke: 7px #ffffff;
  paint-order: stroke fill;
}

.last-update {
  font-size: 0.65rem;
  color: var(--text-sub);
  margin-top: 2px;
  margin-bottom: 15px;
  opacity: 0.85;
  -webkit-text-stroke: 5px #ffffff;
  paint-order: stroke fill;
}

/* ==========================================================================
   4. セクション共通 & About Us
   ========================================================================== */
.section-title {
  font-size: 1.2rem;
  border-bottom: 2px dashed var(--border-sketch);
  padding-bottom: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-text p {
  margin-bottom: 7px;
  font-size: 0.92rem;
}

.content-text p:last-child {
  margin-bottom: 0;
}

/* About Us 内の注意書き */
.about-attention {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-sketch);
  font-size: 0.8rem;
  color: var(--text-sub);
}

.about-attention-title {
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--text-main);
}

.about-attention ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.55;
}

.about-attention ul li {
  position: relative;
  padding-left: 12px;
}

.about-attention ul li::before {
  content: "・";
  position: absolute;
  left: 0;
}

/* ==========================================================================
   5. プロフィール 3連グリッド
   ========================================================================== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .profile-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-col {
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  background: #fffefb;
}

.profile-main-title {
  font-size: 1.25rem;
  text-align: center;
  border-bottom: 2px dashed var(--border-sketch);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.profile-desc {
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ==========================================================================
   6. History & Collaboration
   ========================================================================== */
.badge-label {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 400;
  background: #f4efe4;
  padding: 2px 8px;
  border-radius: 4px;
  color: #333333;
}

.history-list,
.collab-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item,
.collab-item {
  font-size: 0.9rem;
  line-height: 1.65;
}

.history-desc,
.collab-desc {
  margin-top: 3px;
  padding-left: 8px;
  color: var(--text-main);
}

.collab-list {
  margin-top: 12px;
}

/* ==========================================================================
   7. Accounts
   ========================================================================== */
.link-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sketch-btn {
  display: flex;
  align-items: flex-start;                 /* 複数行の説明文に合わせて上揃え */
  gap: 14px;
  padding: 12px 16px;
  background: #faf8f2;
  border: 1.5px solid var(--border-sketch);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.sketch-btn:hover {
  background: #f0ebe1;
  transform: translateY(-2px);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-icon-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #ffffff;
  border: 1px solid var(--border-sketch);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.btn-icon-box img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.btn-text-box {
  flex: 1;
}

.btn-title {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.btn-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 2px;
  line-height: 1.5;
}

/* 鍵垢アコーディオン */
details.sketch-details {
  border: 1.5px dashed var(--border-sketch);
  border-radius: 10px;
  background: #faf8f2;
  overflow: hidden;
}

details.sketch-details summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 1.05rem;
  list-style: none;
}

details.sketch-details summary::-webkit-details-marker {
  display: none;
}

.details-body {
  padding: 14px 18px;
  border-top: 1px dashed var(--border-sketch);
  background: #ffffff;
  font-size: 0.88rem;
}

/* 鍵垢申請ボタン（1行なので上下中央揃え＆改行防止！） */
.apply-btn {
  margin-top: 12px;
  background: #f4efe4;
  align-items: center;                     /* アイコンと文字を上下中央揃えに！ */
}

.apply-btn .btn-icon-box {
  margin-top: 0;                          /* 上下中央なのでマージンをリセット */
}

.apply-btn .btn-title {
  white-space: nowrap;                     /* スマホでも絶対に改行させない！ */
}

/* ==========================================================================
   8. 旦那さまメッセージ
   ========================================================================== */
.partner-msg-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 8px;
  margin-top: 0px;
}

.partner-msg-avatar {
  flex-shrink: 0;
  width: 115px;
  height: auto;
}

.partner-msg-avatar img {
  width: 100%;
  height: auto;
  display: block;
}

.speech-bubble {
  position: relative;
  flex: 1;
  background: #ffffff;
  border: 1.5px solid var(--border-sketch);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 9px 8px 0;
  border-style: solid;
  border-color: transparent var(--border-sketch) transparent transparent;
  display: block;
  width: 0;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 7px 8px 7px 0;
  border-style: solid;
  border-color: transparent #ffffff transparent transparent;
  display: block;
  width: 0;
}

.bubble-title {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--tape-partner-red);
}

.bubble-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-main);
}

/* ==========================================================================
   9. フッター & 背景落書き
   ========================================================================== */
.footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 10px;
}

.footer-note p {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.footer-mascot {
  display: none;                           /* PCでは非表示 */
  width: 100px;
  margin: 0 auto 6px;
  opacity: 0.85;
  transform: rotate(3deg);
}

.footer-mascot img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

/* 🐿️ 左側の落書きリス */
.doodle-squirrel {
  position: absolute;
  left: 220px;
  top: 950px;
  width: 150px;
  transform: rotate(-10deg);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.doodle-squirrel img {
  width: 100%;
  height: auto;
  display: block;
}

/* 🐻 右側の落書きクマ */
.doodle-bear {
  position: absolute;
  right: 100px;
  top: 1300px;
  width: 220px;
  transform: rotate(8deg);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.doodle-bear img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   10. レスポンシブ（スマホ・タブレット対応）
   ========================================================================== */
@media (max-width: 820px) {
  /* スマホ・タブレットでは背景落書きを隠し、フッターマスコットを表示 */
  .doodle-squirrel,
  .doodle-bear {
    display: none;
  }

  .footer-mascot {
    display: block;
  }
}

@media (max-width: 520px) {
  .main-title {
    font-size: 1.15rem;
    padding: 5px 14px;
  }
  
  details.sketch-details summary {
    font-size: 0.95rem;
    padding: 12px 14px;
  }

  /* 鍵垢申請ボタンの文字サイズをスマホ向けに微調整 */
  .apply-btn .btn-title {
    font-size: 0.95rem;
  }
  
  /* 旦那さまメッセージのスマホ調整 */
  .partner-msg-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .partner-msg-avatar {
    width: 105px;
  }

  .speech-bubble {
    text-align: left;
    width: 100%;
  }

  .speech-bubble::before {
    left: 50%;
    top: -9px;
    transform: translateX(-50%);
    border-width: 0 8px 9px 8px;
    border-color: transparent transparent var(--border-sketch) transparent;
  }

  .speech-bubble::after {
    left: 50%;
    top: -7px;
    transform: translateX(-50%);
    border-width: 0 7px 8px 7px;
    border-color: transparent transparent #ffffff transparent;
  }
}