:root {
  --bg: #e0e6f2;
  --bg-2: #f4f7fc;
  --ink: #2b2f38;
  --muted: #546071;
  --silver: #c0ccd8;
  --silver-2: #aebacb;
  --line: #8e9fb6;
  --aqua: #8fb6ff;
  --aqua-2: #6da3ff;
  --deep: #3a4b68;
  --white: #fff;
  --btn-hi: #cfe1ff;
  --btn-lo: #7ea2df;
  --shadow: 0 2px 0 #8797ad, 0 6px 16px rgba(40, 60, 90, .18);
  --radius: 6px;
  --radius-s: 4px;
  --gap: 16px;
  --grid-w: 1200px;
  --ring: 0 0 0 2px #fff inset, 0 0 0 1px var(--line);
}

/* ========= base ========= */

html,
body {
  background:
    radial-gradient(1300px 700px at 20% -10%, #eef3fb 0, #e1e7f3 40%, #d8e0ee 70%, #d0dae8 100%),
    linear-gradient(90deg, #e7edf8 0, #e2e8f4 50%, #e3e9f4 100%);
  color: var(--ink);
  font: 14px/1.7 "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  box-shadow:
    0 0 0 4px #fff inset,
    0 0 0 5px var(--aqua) inset,
    0 1px 0 #595d61,
    0 2px 3px rgba(60, 80, 110, .50);
}

a {
  color: var(--aqua-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.tg-body {
  padding: 18px;
}

/* ========= layout grid (PC 基準) ========= */

.layout-grid {
  max-width: var(--grid-w);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  grid-template-columns: 260px 260px 1fr;
  grid-template-rows: auto auto auto;
}

/* 上段：サムネ＋自己紹介＋リンク */

.hero {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.about {
  grid-column: 2 / 4;   /* 2・3列をまたぐ */
  grid-row: 1 / 2;
}

.links {
  grid-column: 1 / 4;
  grid-row: 5 / 6;
}

/* 中段：更新履歴＋フリースペース */

.updates {
  grid-column: 1 / 3;   /* 左2列ぶち抜き */
  grid-row: 2 / 3;
}

.free {
  grid-column: 3 / 4;   /* 中段右端 */
  grid-row: 2 / 3;
}

/* 下段：タグ・カテゴリ・ログ */

.tags {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}

.cats {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
}

/* ログは右側 2 カラムを大きく使う（最重要） */
.logs {
  grid-column: 2 / 4;
  grid-row: 3 / 5;
}

/* ========= 枠・パーツ ========= */

.box-frill {
  padding: 16px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid transparent;
  position: relative;
  box-shadow:
    0 0 0 2px #fff inset,
    0 0 0 3px #b8c8df inset,
    0 0 12px rgba(100, 120, 150, .25);
}

.box-frill:before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 4px;
  z-index: -1;
  background: repeating-linear-gradient(
    45deg,
    #dce7ff 0 8px,
    #b8c8df 8px 16px
  );
}

.box-dark {
  padding: 14px;
  background: linear-gradient(#c4cbd6, #d8e1ef);
  border: 1px solid #6b7d99;
  border-radius: 4px;
  box-shadow:
    0 0 0 2px #fff inset,
    0 3px 8px rgba(40, 50, 80, .18);
}

.box-glay {
  padding: 14px;
  background: linear-gradient(#adb5be, #d8e1ef);
  border: 1px solid #6b7d99;
  border-radius: 4px;
  box-shadow:
    0 0 0 2px #fff inset,
    0 3px 8px rgba(40, 50, 80, .18);
}

.box-link {
  padding: 14px;
  background: linear-gradient(#8e96a1, #b6bdc9);
  border: 1px solid #6b7d99;
  border-radius: 2px;
  box-shadow:
    0 0 0 2px #c4cbd6 inset,
    0 3px 8px rgba(40, 50, 80, .18);
}

/* ========= list reset ========= */

ul,
ol {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

/* ========= 更新履歴スクロール ========= */

#recentposts,
.recent_posts,
.recentpostbox {
  background: #fff;
  padding: 12px 16px;
  border-radius: 3px;
  border: 1px solid #d0d7e8;
  max-height: 180px;
  overflow-y: auto;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, .06),
    inset 0 0 6px rgba(255, 255, 255, .5);
}

#recentposts::-webkit-scrollbar,
.recent_posts::-webkit-scrollbar,
.recentpostbox::-webkit-scrollbar {
  width: 6px;
}

#recentposts::-webkit-scrollbar-thumb,
.recent_posts::-webkit-scrollbar-thumb,
.recentpostbox::-webkit-scrollbar-thumb {
  background: #c8d4f2;
  border-radius: 4px;
}

/* ========= typo ========= */

h5 {
  margin: 0;
}

/* ========= ボタン ========= */

.btn {
  display: inline-block;
  user-select: none;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid #7d93ae;
  background: linear-gradient(
    #e9f2ff 0,
    #cfe1ff 48%,
    #a9c3ee 49%,
    #9ab7e3 100%
  );
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 #8aa1bf,
    0 3px 0 #6f87a9,
    0 6px 12px rgba(40, 60, 90, .25);
  color: #22324b;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, .18),
    0 1px 0 #6f87a9,
    0 3px 0 #5c769b;
}

.btn--mini {
  padding: 3px 8px;
  font-size: 11px;
}

/* ========= OneLog ========= */

.tg-log {
  margin: 14px 0 20px;
  padding: 10px 12px;
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

.tg-log__head {
  margin: 0 0 8px;
}

.tg-log__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-user img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px; /* 角丸アイコン＋縁あり */
  background: #fff;
  box-shadow:
    0 0 0 2px #fff inset,
    0 0 0 2px var(--aqua) inset,
    0 1px 0 #9db1c8,
    0 2px 5px rgba(60, 80, 110, .25);
}

.onelogbody {
  background: #fff;
  border-radius: 5px;
  border: 1px solid var(--silver);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 #e8eff9;
}

.onelogbody .comment {
  padding: 14px 16px;
  color: var(--ink);
  font-feature-settings: "palt";
}

.tg-log__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-top: 8px;
  background: linear-gradient(#f5f8ff, #eaf1fb);
  border-top: 1px dashed var(--silver);
  border-radius: 0 0 5px 5px;
}

.tg-date {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  color: #2b3950;
  background: linear-gradient(#e6edf7, #ffffff);
  border-radius: 6px;
  box-shadow: var(--ring);
}

.tg-cats {
  font-size: 12px;
  color: var(--muted);
}

/* ========= pager / footer ========= */

.pager {
  text-align: center;
  margin: 18px 0;
}

.tg-footer {
  max-width: var(--grid-w);
  margin: 24px auto 0;
  padding-top: 8px;
  color: var(--muted);
  text-align: center;
}




/* =========================================
   スマホ用レイアウト（レスポンシブ）
   hero about link / updates / free / log / tag / cat
   ========================================= */

@media (max-width: 768px) {

  .tg-body {
    padding: 10px 0;
  }

  .layout-grid {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* 並び順：指定どおり */

  .hero  { order: 1; }
  .about { order: 2; }
  .links { order: 6; }

  .updates { order: 4; }
  .free    { order: 5; }
  .logs    { order: 3; }  /* 最重要：中央にどんと */

  .tags { order: 5; }
  .cats { order: 4; }

  /* グリッド用の指定は無効にしておく（念のため） */
  .hero,
  .about,
  .links,
  .updates,
  .free,
  .logs,
  .tags,
  .cats {
    grid-column: auto;
    grid-row: auto;
  }

  /* ログを一番読みやすく */
  .logs {
    margin-top: 4px;
  }

  .tg-log {
    margin-left: 0;
    margin-right: 0;
  }

   上段コンテンツは縦幅を取りすぎないよう控えめに 
  .about,
  .links,
  .updates,
  .free {
    font-size: 13px;
  }
/*
  .hero{
    max-width: 160px;
  }*/
}
