/* =================================================
   Akane Piano Blog Style
   Elegant / Clean / Trustful
   Responsive & Stable
   ================================================= */

/* =================================================
   Scope & Base Typography
================================================= */
.entry-content,
.post_content,
.wp-block-post-content{
  font-family: 'Roboto', system-ui, -apple-system, "Noto Sans JP", sans-serif;
  font-size:16px;
  color:#14161a;
  line-height:1.85;
}

/* =========================================
   Remove bottom spacing ONLY at the end of components
========================================= */
:where(.post_content, .entry-content, .wp-block-post-content)
:where(.ak-summary, .ak-tip, .ak-note, .ak-warn, blockquote,
  .ak-compare_head,
  .ak-routine,
  .ak-before-after__panel,
  .ak-compare__col,
  .ak-example-card,
)
> :last-child{
	margin-bottom: 0 !important;
	margin-block-end: 0 !important;
}

/* =================================================
   Unified Label System
================================================= */
.ak-label{
  position:absolute;
  top:-.65em;
  left:-.1em;

  display:inline-flex;
  align-items:center;
  gap:.35em;

  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  color:#fff;

  padding:.15em .55em;
  border-radius:4px;
}

/* Color variants */
.ak-label--primary{ background:rgba(39,64,135,.86); } /* brand blue */
.ak-label--ok{      background:rgba(44,122,92,.86); } /* greenish */
.ak-label--ng{      background:rgba(180,70,70,.86); } /* warn red */
.ak-label--muted{   background:rgba(91,100,114,.82); } /* neutral */

/* Mobile: align with your existing label shift */
@media (max-width: 640px){
  .ak-label{ left:.4em; }
}
/* =================================================
   Headings
================================================= */

/* h2 : Brand Gradient */
.entry-content h2,
.post_content h2,
.wp-block-heading{
  margin:2.2em 0 1em;
  padding-bottom:.6em;
  font-size:1.45em;
  font-weight:700;

  background: linear-gradient(
    90deg,
    #274087 0%,
    #4b6fbf 100%
  );
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.entry-content h2::after,
.post_content h2::after{
  content:"";
  display:block;
  width:100%;
  height:2px;
  margin-top:.4em;
  background: linear-gradient(
    90deg,
    #274087 0%,
    #4b6fbf 100%
  );
}

/* h3 : Neutral */
.entry-content h3,
.post_content h3{
  margin:1.8em 0 .6em;
  font-size:1.2em;
  font-weight:600;
  color:#2a2f3a;
}

/* =================================================
   Default ul / ol (UL A / OL A)
================================================= */
.entry-content ul,
.entry-content ol,
.post_content ul,
.post_content ol{
  margin:1em 0 1.2em;
  padding-left:1.4em;
}

.entry-content li,
.post_content li{
  margin:.4em 0;
  line-height:1.75;
}

/* UL */
.entry-content ul li::marker,
.post_content ul li::marker{
  color:#5b6472;
}

/* OL */
.entry-content ol li::marker,
.post_content ol li::marker{
  color:rgba(39,64,135,.55);
  font-weight:600;
}

/* =================================================
   ak-steps
================================================= */
.ak-steps{
  margin:1.6em 0;
  padding:1.4em 1.2em;
  background: rgba(39,64,135,.055);
  border-radius:14px;
  counter-reset: step;
}

.ak-steps li{
  list-style:none;
  position:relative;
  padding-left:2.4em;
}

.ak-steps li::before{
  content:counter(step);
  counter-increment:step;

  position:absolute;
  left:0;
  top:.1em;

  width:1.6em;
  height:1.6em;
  border-radius:999px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:.85em;
  font-weight:700;
  color:#274087;
  background:rgba(39,64,135,.15);
}

/* =================================================
   ak-summary (POINT)
================================================= */
.ak-summary{
  position:relative;
  margin:1.8em 0;
  padding:1.35em 1.2em 1.15em;
  background:rgba(39,64,135,.055);
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.12);
  border-radius:12px;
}

.ak-summary__label{
  position:absolute;
  top:-.65em;
  left:-.1em;

  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;

  background:rgba(39,64,135,.85);
  color:#fff;
  padding:.15em .5em;
  border-radius:4px;
}

/* =================================================
   ak-tip / ak-note / ak-warn
================================================= */
.ak-tip,
.ak-note,
.ak-warn{
  position:relative;
  margin:1.6em 0;
  padding:1.25em 1.2em 1.1em;
  border-radius:12px;
}

.ak-box__label{
  position:absolute;
  top:-.65em;
  left:-.1em;

  display:inline-flex;
  align-items:center;
  gap:.35em;

  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  color:#fff;

  padding:.15em .55em;
  border-radius:4px;
}

/* TIP / NOTE (greenish) */
.ak-tip{
  background:rgba(44,122,92,.07);
  box-shadow: inset 0 0 0 1px rgba(44,122,92,.14);
}
.ak-tip .ak-box__label{
  background:rgba(44,122,92,.82);
}

.ak-note{
  background:rgba(44,122,92,.085);
  box-shadow: inset 0 0 0 1px rgba(44,122,92,.16);
}
.ak-note .ak-box__label{
  background:rgba(44,122,92,.88);
}

/* WARN */
.ak-warn{
  background:rgba(180,70,70,.07);
  box-shadow: inset 0 0 0 1px rgba(180,70,70,.14);
}
.ak-warn .ak-box__label{
  background:rgba(180,70,70,.82);
}

/* =================================================
   blockquote (Variant B)
================================================= */
.entry-content blockquote,
.post_content blockquote{
  margin:1.4em 0;
  padding:1.1em 1.2em;
  background:rgba(39,64,135,.028);
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.06);
  border-radius:12px;
}

.entry-content blockquote cite,
.post_content blockquote cite{
  display:block;
  margin-top:.7em;
  text-align:right;
  font-size:.85em;
  font-style:normal;
  color:rgba(39,64,135,.55);
}

/* =================================================
   ak-muted / ak-small
================================================= */
.ak-muted{
  color:rgba(39,64,135,.65);
}

.ak-small{
  font-size:.85em;
}

/* =================================================
   ak-underline
================================================= */
.ak-underline {
  background: linear-gradient(transparent 70%, #e9d5ff 70%);
  padding: 0 4px;
  border-radius: 2px;
}

/* =================================================
   ② ak-compare（OK/NG比較）
================================================= */
.ak-compare{
  margin:1.6em 0;
  display:grid;
  gap:.8em;
}
.ak-compare__row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:.8em;
}
.ak-compare__col{
  position:relative;
  padding:1.1em 1.1em 1em;
  border-radius:12px;
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.10);
  background:rgba(39,64,135,.03);
}
.ak-compare__head{
  font-weight:700;
  margin:0 0 .25em !important;
  font-size:.95em;
  color:#2a2f3a;
}

.ak-compare__col--ok{
  background:rgba(44,122,92,.06);
  box-shadow: inset 0 0 0 1px rgba(44,122,92,.14);
}
.ak-compare__col--ok .ak-compare__head{ color:rgba(44,122,92,.95); }

.ak-compare__col--ng{
  background:rgba(180,70,70,.06);
  box-shadow: inset 0 0 0 1px rgba(180,70,70,.14);
}
.ak-compare__col--ng .ak-compare__head{ color:rgba(180,70,70,.95); }

/* 文字を前面に。背景記号は::beforeで背面に */
.ak-compare__col > *{
  position:relative;
  z-index:2;
}

/* 共通：背景記号のレイヤー */
.ak-compare__col::before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:92px;
  height:92px;
  display:grid;
  place-items:center;
  border-radius:999px;
  z-index:1;
  pointer-events:none;
  opacity:.14;
  transform:translate(-50%, -50%) rotate(0deg);
}

/* OK：丸（○）を背景色と同系統で */
.ak-compare__col--ok::before{
  content:"〇";
  font-size:70px;
  font-weight: bold;
  line-height:1;
  color:rgba(44,122,92,.55);
  background:rgba(44,122,92,.08); /* うっすら面も付けたい場合 */
}

/* NG：×を背景色と同系統で */
.ak-compare__col--ng::before{
  content:"×";
  font-size:80px;
  font-weight: bold;
  line-height:1;
  color:rgba(180,70,70,.55);
  background:rgba(180,70,70,.08);
}

/* =================================================
   ③ ak-routine（練習ルーティンカード）
================================================= */
.ak-routine .ak-routine__grid{
  display:grid;
  gap:.75em;
  justify-items: center;
}

.ak-routine .ak-routine__item{
  display:grid !important;
  grid-template-columns: 4.2em 1fr;
  width: min(100%, 980px);  /* ← 好みで 860〜980px くらい */
  gap:.9em;
  align-items:center;
  padding:.85em 0;
  border-radius:12px;
  background:#fff;
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.09);
}

.ak-routine .ak-routine__time{
  margin:0 !important;
  font-weight:800;
  color:rgba(39,64,135,.96);
  line-height:1.2;
  text-align:center; 
}

.ak-routine .ak-routine__text{
  margin:0 !important;
  display:flex !important;
  align-items:center;
  gap:.6em;
  min-width:0;
}

.ak-routine .ak-routine__pill{
  flex:0 0 3.4em;
  text-align:center;

  display:inline-flex;
  align-items:center !important;
  justify-content:center;

  padding:.18em .4em;
  border-radius:999px;

  font-size:.82em;
  font-weight:800;
  line-height:1;

  color:rgba(39,64,135,.92);
  background:rgba(39,64,135,.06);
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.10);
}

.ak-routine .ak-routine__content{
  min-width:0;
  line-height:1.75;
  color:#2a2f3a;
}

 .ak-routine{
  position:relative;
  padding-top:1.8em;
  background-color: rgba(39, 64, 135, .03);
 } 

.ak-routine.ak-routine--simple{
  padding: 1em;
  border-radius: 14px;
  background: rgba(39, 64, 135, .03);
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.08);
  /* 方眼紙模様に必須のスタイル */
  background-image: linear-gradient(0deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px)),
                    linear-gradient(90deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px));
  background-size: 16px 16px;
  background-repeat: repeat;
  background-position: center center;

  /* 以下任意のスタイル */
  padding: 20px;
}

.ak-routine.ak-routine--simple .ak-routine__head{
  text-align:center;
  font-weight: 900;
  font-size: 20px;
  color: rgba(39,64,135,.96);
  margin: 0 0 .85em;
}


/* =================================================
   ④ ak-before-after（気づきのBefore/After）
================================================= */

.ak-before-after{
  margin:1.8em 0;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:.8em;
  align-items:start; /* ← center をやめる */
}


.ak-before-after__panel--before{
  grid-column:1;
}

.ak-before-after__panel--after{
  grid-column:3;
}

.ak-before-after::after{
  content:"";
  grid-column:2;
  grid-row:1;
  align-self:flex-start; 

  width:0;
  height:0;

  /* ▶ 右向き三角 */
  border-top:22px solid transparent;
  border-bottom:22px solid transparent;
  border-left:32px solid rgba(39,64,135,.35);

  /* カード上部と高さを合わせる微調整 */
  margin-top:2.2em;
}

/* パネル共通 */
.ak-before-after__panel{
  position:relative;
  padding:1.15em 1.1em 1.05em;
  border-radius:12px;
  background:rgba(39,64,135,.03);
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.10);
}

/* タイトル */
.ak-before-after__title{
  font-weight:700;
  margin:0 0 .45em !important;
  font-size:.95em;
}

/* BEFORE */
.ak-before-after__panel--before .ak-before-after__title{
  color:rgba(180,70,70,.95);
}
.ak-before-after__panel--before{
  background:rgba(180,70,70,.05);
  box-shadow: inset 0 0 0 1px rgba(180,70,70,.12);
}

/* AFTER */
.ak-before-after__panel--after .ak-before-after__title{
  color:rgba(44,122,92,.95);
}
.ak-before-after__panel--after{
  background:rgba(44,122,92,.05);
  box-shadow: inset 0 0 0 1px rgba(44,122,92,.12);
}

/* =================================================
   ak-example-cards (例を比較ではなく、列挙するときに使用)
================================================= */
.ak-example-cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1em;
  margin: 1.6em 0;
}

.ak-example-card{
  padding: 1.15em 1.1em 1.05em;
  background: rgba(39,64,135,.04);
  box-shadow: inset 0 0 0 1px rgba(39,64,135,.10);
  border-radius: 12px;
}

/* title */
.ak-example-card__title{
  margin: 0 0 .6em 0 !important;
  font-size: .95em;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(39,64,135,.9);
}

/* 中の最初の要素は詰める（既存ルールと整合） */
.ak-example-card > :last-child{
  margin-bottom: 0 !important;
  margin-block-end: 0 !important;
}

/* カード内リストの微調整 */
.ak-example-card ul{
  margin: 0;
  padding-left: 1.2em;
}
.ak-example-card li{
  margin: .35em 0;
}

/* =================================================
   Responsive
================================================= */
@media (max-width: 640px){
  .ak-example-cards{
    gap: .8em;
  }
}

/* =========================================
   Remove top margin for p inside components
========================================= */
.post_content :is(
  .ak-summary,
  .ak-tip,
  .ak-note,
  .ak-warn,
　blockquote,
) > p:first-child{
  margin-bottom: 0 !important;
}

/* =================================================
   Responsive (Mobile)
================================================= */
@media (max-width: 640px){

  /* h2 */
  .entry-content h2,
  .post_content h2{
    font-size:1.3em;
  }

  /* boxed components */
  .ak-summary,
  .ak-tip,
  .ak-note,
  .ak-warn,
  .entry-content blockquote,
  .post_content blockquote{
    padding:1.1em 1em;
  }

  /* labels */
  .ak-summary__label,
  .ak-box__label{
    left:.4em;
  }

  /* steps spacing */
  .ak-steps li{
    padding-left:2.1em;
  }
	.ak-compare__row{
    grid-template-columns:1fr;
  }

  .ak-routine__item{
    grid-template-columns: 5.8em 1fr;
  }

  /* before-afterの▼記号の位置を修正 */
  .ak-before-after{
    grid-template-columns:1fr;
  }

  .ak-before-after__panel--before{
    grid-column:1;
  }

  .ak-before-after::after{
    grid-column:1;
    grid-row:2;
    justify-self:center;
    margin:.3em 0;

    /* ▼ 下向き三角 */
    border-left:22px solid transparent;
    border-right:22px solid transparent;
    border-top:32px solid rgba(39,64,135,.35);

    border-bottom:0;
  }

  .ak-before-after__panel--after{
    grid-column:1;
  }

  /* OK/NGの背景記号の大きさを小さくする */
  .ak-compare__col::before{
    width:78px;
    height:78px;
  }
  .ak-compare__col--ok::before,
  .ak-compare__col--ng::before{
    font-size:78px;
  }
}
