@charset "UTF-8";

/* Theme: Modernized Cuppuccino Custom
  Base Color: #46757E
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
    /* メインカラー定義 */
    --main-color: #46757E;
    --main-light: #f0f5f5;
    --accent-color: #e67e22; /* 補色として微調整 */
    --text-color: #333333;
    --text-muted: #666666;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    
    /* 共通パーツ */
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --max-width: 1140px;
}

/* Base Reset */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    overflow-wrap: break-word;
}

a {
    color: var(--main-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Layout */
#content {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

#content-inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 992px) {
    #content-inner {
        flex-direction: row;
    }
    #wrapper {
        flex: 1;
        min-width: 0;
    }
    #box2 {
        width: 320px;
    }
}

.breadcrumb {
    font-size: 0.85rem;
    color: #666;
    margin: 10px 0px;
    padding-left: 35em; /* 左側に内側の余白を作る */
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* リンクや区切り文字の設定は前回と同じ（省略） */
.breadcrumb a { color: #46757E; text-decoration: none; }
.breadcrumb-child::after { content: "/"; margin: 0 8px; color: #ccc; }
.breadcrumb-child:last-of-type { display: none; }

/* ---------------------------------------------------------
   Global Navigation (Desktop & Mobile)
   --------------------------------------------------------- */

/* Desktop Navigation */
@media (min-width: 768px) {
    #nav-content {
        background: var(--nav-bg);
        box-shadow: var(--shadow);
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .g-nav {
        display: flex;
        justify-content: center;
        text-align: center;
        list-style: none;
        margin: 0;
        padding: 0;
        max-width: var(--max-width);
    }

    .g-nav li {
        width: 100%;
    }
    
    .g-nav li a {
        display: block;
        padding: .8em 0;
        color: var(--nav-text);
        font-weight: 700;
        font-size: 0.9rem;
    }
    .g-nav li a:hover { background: var(--nav-hover); opacity: 1; }

    /* Dropdown */
    .has-submenu:hover .submenu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0); /* 元の位置に戻る */
    pointer-events: auto;
    }
    .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        min-width: 200px;
        box-shadow: var(--shadow);
        list-style: none;
        padding: 10px 0;
        border-radius: 0 0 4px 4px;
    }
/* サブメニューのスタイル */
.has-submenu {
  position: relative;
  padding: .6em 0;
  font-weight: bold;
}

.submenu {
  display: none; /* デフォルトは非表示 */
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--navigation-color);
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1;
  box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
  width: 100%; /* .has-submenuと同じ幅 */
}

.submenu li a {
  padding: 10px;
  color: #555;
  font-size: .9rem;
  font-weight: bold;
}

.submenu li a:hover {
  background: var(--navigation-hover-color);
  color: #333;
}

/* ホバー時にサブメニューを表示 */
.has-submenu:hover .submenu {
  display: block;
}

/* モバイル用スタイル */
@media (max-width: 767px) {
  #nav-drawer {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
  }

  .nav-unshown {
    display: none;
  }

  #nav-open {
    display: flex;
    flex-direction: column;
    text-align: center;
    line-height: 1;
    background: rgba(255, 255, 255, .7);
    padding: .5em;
    border-radius: 6px;
    color: #2a2922;
    font-weight: bold;
  }

  .g-nav-icon {
    font-size: 25px;
  }

  .mini-text {
    font-size: 10px;
  }

  #nav-close {
    display: none;
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    transition: .3s ease-in-out;
  }

  #nav-content {
    overflow: auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 85%;
    max-width: 500px;
    height: 100%;
    background: #fff;
    transition: .3s ease-in-out;
    transform: translateX(-130%);
  }

  #nav-input:checked ~ #nav-close {
    display: block;
    opacity: .5;
  }

  #nav-input:checked ~ #nav-content {
    transform: translateX(0%);
    box-shadow: 6px 0 25px rgba(0, 0, 0, .15);
  }

  .nav-close {
    text-align: center;
    display: flex;
    flex-direction: column;
    padding: 1em;
    font-size: .85rem;
    font-weight: bold;
    letter-spacing: .05em;
    line-height: 1;
  }

  .nav-close i {
    font-size: 2rem;
  }
}

/* デスクトップ用スタイル */
@media (min-width: 768px) {
  #nav-input, .nav-close {
    display: none;
  }

  #nav-content {
    position: relative;
    background: var(--navigation-color);
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
  }

  #nav-open {
    display: none;
  }

  .g-nav {
    display: flex;
    justify-content: space-around;
    margin: 0 auto;
    padding: 0;
    max-width: 1200px;
  }

  .g-nav li a {
    font-size: .90rem;
  }
}
    
    #nav-open, #nav-input, .nav-close { display: none; }
}

/* Mobile Navigation (Drawer) */
@media (max-width: 767px) {
    #nav-drawer {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 9999;
    }
    #nav-input { display: none; }
    #nav-open {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: var(--main-color);
        padding: 8px;
        border-radius: 6px;
        cursor: pointer;
        box-shadow: var(--shadow);
    }
    .g-nav-icon { font-size: 20px; margin-bottom: 2px; }
    .mini-text { font-size: 10px; font-weight: bold; }

    #nav-content {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background: #fff;
        z-index: 10000;
        transform: translateX(-105%);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        padding-top: 60px;
    }
    #nav-input:checked ~ #nav-content { transform: translateX(0); box-shadow: 10px 0 20px rgba(0,0,0,0.1); }
    
    #nav-close {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }
    #nav-input:checked ~ #nav-close { display: block; }

    .g-nav { list-style: none; padding: 0; margin: 0; }
    .g-nav li { border-bottom: 1px solid #f0f0f0; }
    .g-nav li a { display: block; padding: 15px 25px; color: var(--text-color); font-weight: bold; }
    
    .submenu { list-style: none; padding: 0; background: var(--bg-color); }
    .submenu li a { padding-left: 45px; font-size: 0.9rem; }
}


/* Header */
#blog-title {
    background: var(--main-color);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 0;
}

#title a {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

#blog-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Entry Card */
.entry {
    background: var(--card-bg);
    padding: 30px;
    margin-bottom: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .entry { padding: 50px; }
}

.entry-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}

.entry-title a {
    color: var(--text-color);
}

/* Content Headings */
.entry-content h2 {
    position: relative;
    padding: 15px 20px;
    background: var(--main-light);
    border-left: 6px solid var(--main-color);
    font-size: 1.5rem;
    margin: 40px 0 20px;
    border-radius: 0 4px 4px 0;
}

.entry-content h3 {
    border-bottom: 2px solid var(--main-light);
    padding-bottom: 10px;
    font-size: 1.3rem;
    margin: 30px 0 15px;
    display: flex;
    align-items: center;
}

.entry-content h3::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--main-color);
    margin-right: 12px;
    border-radius: 2px;
}

.entry-content h4 {
    font-size: 1.15rem;
    padding-left: 10px;
    border-left: 3px solid var(--main-color);
    margin: 25px 0 15px;
}

/* TOC (Table of Contents) */
.table-of-contents {
    background: var(--bg-color);
    border: 1px solid #eee !important;
    border-radius: var(--radius);
    padding: 25px !important;
    margin: 30px 0 !important;
}

.table-of-contents::before {
    content: "目次";
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--main-color);
    text-align: center;
}

/* カテゴリー・タグのリンクスタイル */
.categories a, 
.urllist-categories a {
    display: inline-block;
    text-decoration: none;
    
    /* カラー設定：ベースカラーを背景に、文字は白で読みやすく */
    background-color: #46757E;
    color: #ffffff;
    
    /* サイズ・余白：少し広めにとってボタンらしく */
    padding: 4px 12px;
    margin: 2px 4px 2px 0;
    font-size: 0.85em;
    font-weight: 500;
    
    /* 角丸：少し丸みを強めることでモダンな印象に */
    border-radius: 6px;
    
    /* アニメーション：ホバー時の変化を滑らかに */
    transition: all 0.2s ease-in-out;
}

/* 「編集する」ボタン */
.entry-header-menu {
    position: absolute;
    top: 0;
    right: 0;
}

/* ホバー（マウスを乗せた時）のスタイル */
.categories a:hover, 
.urllist-categories a:hover {
    background-color: #365b62; /* 少し暗くして押し心地を出す */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* 軽く浮かせる */
    transform: translateY(-1px); /* わずかに上に動かす */
}

/* Code Blocks */
.entry-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    overflow-x: auto;
    position: relative;
}

.code-frame .__select-code {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
}

/* サイドバーモジュール */
.hatena-module {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 2em;
    padding: 1rem;
    background: var(--card-bg);
    font-size: .85rem;
    border-radius: var(--radius);
    box-shadow: rgba(0,0,0,.1) 0px 4px 6px -1px, rgba(0,0,0,.06) 0px 2px 4px -1px;
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
}

.hatena-module-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--main-color);
    border-bottom: 2px solid var(--main-light);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
}

/* Profile Custom */
.design-profile-wrap {
    text-align: center;
    border: none !important;
}

.design-profile_icon img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--main-light);
}

/* Step Bar */
.step-wrap1 {
    counter-reset: count;
    margin: 30px 0;
}

.step-content1 {
    padding: 0 0 30px 40px;
    position: relative;
}

.step-content1::before {
    counter-increment: count;
    content: counter(count);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: var(--main-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 2;
}

.step-content1::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: var(--main-light);
}

.step-content1:last-child::after { display: none; }

/* Fixed Table of Contents (Stoc) */
#stoc-module {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
}

#stoc .active {
    color: var(--main-color);
    font-weight: 700;
}

/* Page Top Button */
#page-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    background: var(--main-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
}

/* SNS Share Buttons */
.sharebtn_list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sharebtn_item a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Archive Page Grid */
@media (min-width: 768px) {
    .page-archive .archive-entries {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Search module */
.search-form {
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 100%;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.search-module-input {
    -webkit-box-flex: 1;
        -ms-flex: 1 0;
            flex: 1 0;
    padding: 5px;
    color: #454545;
    background: none;
    border: none;
    outline: none;
    height: 20px;
}

/* テーブル全体のスタイル */
.entry-content table {
    width: 100%; /* 基本は横幅いっぱいに広げるのがモダン */
    max-width: 100%;
    margin-bottom: 1.5em;
    border-collapse: collapse; /* 隣り合う線を重ねる */
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    border-radius: 8px; /* 角を少し丸める（隠れた角に適用） */
    overflow: hidden;
}

/* キャプション（タイトル） */
.entry-content table caption {
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    padding: 10px 0;
    color: #444;
}

/* 見出しセル（th） */
.entry-content table th {
    background-color: #f8f9fa; /* 圧迫感のない薄いグレー */
    border-bottom: 2px solid #eee; /* 下線のみ強調 */
    border-top: 1px solid #eee;
    color: #555;
    font-weight: 600;
    text-align: center;
    padding: 12px 15px; /* 余白を広めにとる */
    white-space: nowrap; 
}

/* 通常のセル（td） */
.entry-content table td {
    border-bottom: 1px solid #eee; /* 横線のみにしてスッキリさせる */
    padding: 12px 15px;
    background-color: #fff;
}

/* 行のホバー効果（マウスを乗せた時に色を変える） */
.entry-content table tr:hover td {
    background-color: #fcfcfc;
}

.search-module-button {
    width: 24px;
    height: 24px;
    margin-right: 5px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Esearch%3C/title%3E%3Cpath d='M16.7,15l-3.4-3.3h-.1a5.4,5.4,0,0,0,.9-3.1,5.6,5.6,0,1,0-5.6,5.6,5.4,5.4,0,0,0,3.1-.9.1.1,0,0,0,.1.1L15,16.7a1.1,1.1,0,0,0,.8.3,1.6,1.6,0,0,0,.9-.3,1.4,1.4,0,0,0,0-1.7M8.5,12.3A3.8,3.8,0,0,1,4.8,8.5,3.8,3.8,0,0,1,8.5,4.7a3.9,3.9,0,0,1,3.8,3.8,3.8,3.8,0,0,1-3.8,3.8'/%3E%3Crect class='a' width='20' height='20'/%3E%3C/svg%3E") no-repeat center;
    background-size: 20px 20px;
    border: none;
    outline: none;
    color: transparent;
    overflow: hidden;
    opacity: .5;
    cursor: pointer;
}

.search-module-button:hover, .search-result-button:hover {
    opacity: .85;
}

/* --- URLリスト全体の構造 --- */
.hatena-urllist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hatena-urllist li {
    padding: 12px 0; /* 余白を広げてスッキリ */
    border-bottom: 1px solid #eee; /* 軽い仕切り線 */
    transition: background-color 0.2s;
}

.hatena-urllist li:last-child {
    border-bottom: none; /* 最後の線は消す */
    padding-bottom: 0;
}

/* 記事タイトルリンク */
.hatena-urllist li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    transition: color 0.2s;
}

.hatena-urllist li a:hover {
    color: #46757E; /* ホバー時にテーマカラーに */
}

/* カテゴリーラベル（リスト内） */
.hatena-urllist .urllist-category-link {
    font-size: 0.75rem;
    background-color: rgba(70, 117, 126, 0.1); /* ほんのり色づけ */
    color: #46757E;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
    font-weight: bold;
}

/* 日付 */
.hatena-urllist .urllist-date-link a {
    color: #999;
    font-size: 0.8rem;
    text-decoration: none;
}

/* 記事本文の抜粋 */
.hatena-urllist .urllist-entry-body {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

/* --- カテゴリーモジュール（ボタン形式） --- */
.hatena-module-category .hatena-urllist {
    display: flex;
    flex-wrap: wrap; /* 横に並べて折り返す */
    gap: 8px; /* ボタン同士の隙間 */
    padding-top: 10px;
}

.hatena-module-category .hatena-urllist li {
    padding: 0;
    border-bottom: none; /* リスト形式の線を消す */
    display: inline-block;
}

.hatena-module-category .hatena-urllist li a {
    display: inline-block;
    font-size: 0.8rem;
    padding: 6px 14px;
    border: 1px solid #46757E; /* 枠線をベースカラーに */
    color: #46757E;
    border-radius: 20px; /* 角丸のピル型 */
    background: #fff;
    transition: all 0.3s ease;
}

.hatena-module-category .hatena-urllist li a:hover {
    background: #46757E; /* 塗りつぶし */
    color: #fff; /* 文字を白に */
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(70, 117, 126, 0.2);
}

/* アーカイブモジュールの階層（月別など） */
.hatena-urllist .archive-module-year .archive-module-month {
    margin: 5px 0 5px 1.5em;
    padding-left: 10px;
    border-left: 1px solid #ddd; /* 階層を線で表現 */
    list-style-type: none !important;
}