:root {
  --max-width: 100%;
}

body,
html {
  overflow-x: clip!important;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html .btn:focus,
html a:focus {
  box-shadow: none!important;
}

html a {
  text-decoration: none!important;
}

.card {
  border: none;
}

.timeline .timeline-item:last-child::before {
  background: 0 0;
}

html ::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: 0 0;
}

.suka-devide-dot::after {
  content: " · ";
}

.share-menu {
  text-align: left;
}

.dropdown a {
  cursor: pointer;
}

.icon {
  box-sizing: border-box;
  display: inline-block;
  font-size: inherit;
  font-style: normal;
  height: 1em;
  position: relative;
  text-indent: -9999px;
  vertical-align: middle;
  width: 1em;
}

.icon::after,
.icon::before {
  display: block;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
}

.icon.icon-2x {
  font-size: 1.6rem;
}

.icon.icon-3x {
  font-size: 2.4rem;
}

.icon.icon-4x {
  font-size: 3.2rem;
}

.accordion .icon,
.btn .icon,
.menu .icon,
.toast .icon {
  vertical-align: -10%;
}

.btn-lg .icon {
  vertical-align: -15%;
}

.icon-arrow-down::before,
.icon-arrow-left::before,
.icon-arrow-right::before,
.icon-arrow-up::before,
.icon-back::before,
.icon-downward::before,
.icon-forward::before,
.icon-upward::before {
  border: .1rem solid currentColor;
  border-bottom: 0;
  border-right: 0;
  content: "";
  height: .65em;
  width: .65em;
}

.icon-arrow-down::before {
  transform: translate(-50%,-75%) rotate(225deg);
}

.icon-arrow-left::before {
  transform: translate(-25%,-50%) rotate(-45deg);
}

.icon-arrow-right::before {
  transform: translate(-75%,-50%) rotate(135deg);
}

.icon-arrow-up::before {
  transform: translate(-50%,-25%) rotate(45deg);
}

.icon-back::after,
.icon-forward::after {
  background: currentColor;
  content: "";
  height: .1rem;
  width: .8em;
}

.icon-downward::after,
.icon-upward::after {
  background: currentColor;
  content: "";
  height: .8em;
  width: .1rem;
}

.icon-back::after {
  left: 55%;
}

.icon-back::before {
  transform: translate(-50%,-50%) rotate(-45deg);
}

.icon-downward::after {
  top: 45%;
}

.icon-downward::before {
  transform: translate(-50%,-50%) rotate(-135deg);
}

.icon-forward::after {
  left: 45%;
}

.icon-forward::before {
  transform: translate(-50%,-50%) rotate(135deg);
}

.icon-upward::after {
  top: 55%;
}

.icon-upward::before {
  transform: translate(-50%,-50%) rotate(45deg);
}

header {
  padding: 1.2rem .4rem .6rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #e0e0e0;
}

.container {
  margin-top: 150px;
}

.post-container {
  margin-top: 130px;
}

header a {
  color: #000;
  text-decoration: none;
}

header a:focus,
header a:hover,
header a:visited {
  text-decoration: none;
  color: #50596c;
}

header .divider {
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  opacity: .5;
}

.header-title {
  font-size: 1.2rem;
}

@media (min-width: 481px) {
  .header-title {
    font-size: 1.4rem;
  }
}

@media (min-width: 1025px) {
  .header-title {
    font-size: 1.3rem;
  }
}

.header-slogan {
  font-size: .75rem;
  margin-bottom: .8rem;
}

.navbar-link {
  padding: .35rem .4rem;
}

/* Count of the current section: on the nav row, aligned to content's right edge */
.navbar-section {
  position: relative;
}

.navbar-count-display {
  position: absolute;
  right: calc(8px + 1% - .4rem);
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #50596c;
}

@media (prefers-color-scheme: dark) {
  .navbar-count-display {
    color: #ccc;
  }
}

.page-title {
  font-size: 1.2rem;
}

.navbar-section.text-center {
  padding-left: .6rem;
  padding-right: .6rem;
}

/* Hamburger toggle: hidden on desktop, links shown inline */
.nav-toggle-btn,
.nav-backdrop,
.navbar-menu-header {
  display: none;
}

@media (prefers-color-scheme: dark) {
  header {
    background-color: #363b40;
  }

  header a {
    color: #eee;
  }
}

/* Mobile: collapse links behind a hamburger button */
@media screen and (max-width: 480px) {
  header {
    padding-bottom: .3rem;
  }

  .header-slogan {
    margin-bottom: 0;
  }

  .container,
  .post-container {
    margin-top: 100px;
  }

  .nav-toggle-btn {
    display: inline-block;
    position: fixed;
    top: .6rem;
    right: .8rem;
    z-index: 210;
    cursor: pointer;
    line-height: 1;
    padding: .2rem .5rem;
    user-select: none;
  }

  .nav-toggle-btn::before {
    content: "\2630"; /* ☰ */
    font-size: 1.5rem;
  }

  .nav-toggle:checked ~ .nav-toggle-btn::before {
    content: "\00d7"; /* × */
  }

  /* Dim backdrop behind the drawer; tap to close */
  .nav-backdrop {
    display: none;
  }

  .nav-toggle:checked ~ .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, .5);
  }

  /* Slide-in drawer from the right */
  .navbar-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50vw;
    max-width: 320px;
    z-index: 200;
    padding: .6rem 1.2rem 1.2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .25s ease;
    background: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, .25);
  }

  .nav-toggle:checked ~ .navbar-menu {
    transform: translateX(0);
  }

  .navbar-menu-header {
    display: block;
    padding: .3rem .5rem 1rem;
    margin-bottom: .5rem;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
  }

  .navbar-menu .navbar-link {
    display: block;
    padding: .6rem .5rem;
    text-align: left;
  }

  .navbar-count-display {
    display: none;
  }

  @media (prefers-color-scheme: dark) {
    .navbar-menu {
      background: #2a2e33;
      box-shadow: -4px 0 16px rgba(0, 0, 0, .5);
    }

    .navbar-menu-header {
      border-bottom-color: rgba(255, 255, 255, .12);
    }
  }

  /* Search page: pin the footer to the bottom of the viewport */
  body:has(.search-container) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  body:has(.search-container) footer {
    margin-top: auto;
  }
}

.main-container {
  width: 98%;
  margin-left: auto;
  margin-right: auto;
}

.post-stream-container {
  width: 100%;
}

.pagination {
  margin: 0 0;
  padding: 0 0;
}

.pagination .page-item {
  margin: 0 0;
}

.pagination .page-item i {
  vertical-align: -7.5%!important;
}

.pagination .page-item a:hover {
  color: #667189;
  opacity: .85;
}

.column-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*!* iPad portrait *!*/
/*!* iPhone landscape  *!*/
/*!* desktop, iPad landscape *!*/
@media (min-width: 1024px) {
  .post-entry .column-body {
    order: 0;
  }
}

.post-entry a.card-title {
  font-size: 1.1rem;
}

.post-entry.card {
  box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);
  margin: .8rem 0;
  border-radius: 0;
  position: relative;
  min-width: 0;
  word-wrap: break-word;
  background-clip: border-box;
}

.post-entry .post-thumbnail {
  width: auto;
  height: auto;
  min-height: 8rem;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.post-entry a.card-title,
.post-entry a.card-title:focus,
.post-entry a.card-title:hover,
.post-entry a.card-title:visited {
  color: #303030;
  opacity: 1;
  text-decoration: none;
  font-weight: 600;
}

.post-entry .post-entry-info {
  font-size: .75rem;
  line-height: 1.6;
}

.post-entry .author-thumb,
.post-header-info .author-thumb {
  width: 24px;
  height: 24px;
  float: left;
  margin-right: 9px;
  border-radius: 100%;
}

.post-entry .card-body {
  padding-top: .6rem;
  font-size: .9rem;
}

.post-entry .text-gray a {
  color: #acb3c2!important;
}

.post-entry .text-gray a:hover {
  color: #999!important;
}

.post-entry .card-footer {
  padding: .4rem .8rem;
}

.post-entry .card-footer:last-child {
  padding-bottom: .6rem;
}

.mb-0.card-body code {
  margin: 0;
  background-color: #eee;
  border-radius: 3px;
}

.read-more {
  text-align: right;
}

.post-entry .card-body a {
  color: #d73e48;
}

@media only screen and (min-width: 721px) {
  .post-entry a.card-title {
    font-size: 1.1rem;
  }

  .post-entry .card-body {
    font-size: 1.2rem;
  }
}

@media only screen and (min-width: 961px) {
  .post-entry a.card-title {
    font-size: 1.1rem;
  }

  .post-entry .card-body {
    font-size: 1rem;
  }
}

@media only screen and (min-width: 961px) and (max-height: 640px) {
  .post-entry a.card-title {
    font-size: 1rem;
  }

  .post-entry .card-body {
    padding-top: .6rem;
    font-size: .8rem;
  }

  .post-entry .post-thumbnail {
    min-height: 6.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #363b40;
    color: #e6e1d9;
  }

  a:focus,
  header a:hover,
  header a:visited {
    color: #eee;
  }

  .footer-copyright a:hover {
    color: #54c1ff;
    text-decoration: none!important;
  }

  .post-entry .bg-color {
    background-color: #3d4246;
  }

  .post-entry a.card-title,
  .post-entry a.card-title:focus,
  .post-entry a.card-title:hover,
  .post-entry a.card-title:visited {
    color: #eee;
  }

  .mb-0.card-body code {
    background-color: #555;
  }

  code {
    color: #fff;
  }

  .navbar-link,
  .navbar-link:focus,
  .navbar-link:hover,
  .navbar-link:visited,
  .timeline .timeline-item .timeline-icon.icon-lg {
    color: #54c1ff;
  }

  .read-more a {
    color: #54c1ff;
  }
}

.post-entry .column-thumbnail {
  min-height: 184px;
}

/* ===== 縮圖改為單字/文法卡片 (nani-blog 風格) ===== */
.post-entry .column-thumbnail:has(.word-card) {
  align-items: stretch;
  background-color: transparent;
}

.word-card,
.word-card:visited,
.word-card:hover,
.word-card:focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 184px;
  padding: 1.4rem 1rem;
  text-align: center;
  color: #303030;
  text-decoration: none;
  opacity: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdf1ef 0%, #f8e3e4 100%);
}

.word-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(215, 62, 72, .05);
}

.word-card-level {
  position: absolute;
  top: 0;
  right: 0;
  font-size: .62rem;
  font-weight: 700;
  padding: .12rem .42rem;
  border-radius: 0 0 0 4px;
  letter-spacing: .03rem;
  color: #fff;
  background: #d73e48;
  z-index: 2;
}

.word-card-word {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01rem;
  color: #d73e48;
  word-break: break-word;
  z-index: 1;
}

.word-card-meaning {
  margin-top: .55rem;
  font-size: .85rem;
  font-weight: 700;
  color: #555;
  word-break: break-word;
  z-index: 1;
}

/* ---- 句型卡:句型 → 意思 → 接続 → 例句 (由上到下) ---- */
.word-card--grammar {
  padding: 1.1rem .85rem;
}

.gcard-conn {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  align-items: flex-start;
  text-align: left;
  gap: .12rem;
  margin-top: .55rem;
  padding: .5rem .6rem;
  border: 1px solid rgba(215, 62, 72, .28);
  border-radius: 7px;
  background: rgba(255, 255, 255, .55);
  font-size: .58rem;
  line-height: 1.45;
  color: #1f5fbf;
  word-break: break-word;
  z-index: 1;
}

.gcard-example {
  align-self: stretch;
  text-align: left;
  margin-top: .5rem;
  font-size: .64rem;
  line-height: 1.45;
  color: #555;
  word-break: break-word;
  z-index: 1;
}

@media only screen and (min-width: 721px) {
  .word-card-word {
    font-size: 1.3rem;
  }
}

@media (prefers-color-scheme: dark) {
  .post-entry .column-thumbnail:has(.word-card) {
    background-color: transparent;
  }
}

.home-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-box-item {
  flex-grow: 0;
}

.home-box-empty {
  flex-grow: 1;
}

.post-container {
  width: 96%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-top: 0.8rem;
  background: #fff;
  border-radius: .1rem;
  box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);
}

#post-card {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 820px;
}

#post-card.card {
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .post-container {
    background-color: #3d4246;
  }
}

#post-card .card-image {
  display: flex;
  box-sizing: border-box;
  background-size: cover;
  flex-grow: 1;
  box-orient: horizontal;
  box-direction: normal;
  flex-direction: row;
  align-items: flex-end;
  background-repeat: repeat;
  background-position: 50% 50%;
  background-origin: padding-box;
  background-attachment: scroll;
  height: 12.36rem;
}

@media screen and (min-width: 481px) {
  #post-card .card-image {
    height: 13.6rem;
  }
}

@media screen and (min-width: 721px) {
  #post-card .card-image {
    height: 14rem;
  }
}

#post-card .card-item-container {
  display: flex;
  align-items: center;
}

#post-card .card-inner-cell {
  width: 100%;
}

#post-card .card-header {
  padding: .8rem 1.2rem .2rem;
  border-bottom: .05rem solid #ddd;
}

#post-card .post-header-info {
  margin-bottom: 0;
  font-size: .75rem;
}

#post-card .post-header-info-left {
  float: left;
  line-height: 1.6;
}

#post-card .post-header-info-right {
  float: right;
}

#post-card .post-header-info-right a {
  text-decoration: none;
}

.post-categories-list,
.post-tags-list {
  padding: 0;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0;
  font-size: .7rem;
  line-height: 1.3;
}

a.post-categories-list-item,
a.post-tags-list-item {
  display: inline-block;
  font-size: .6rem;
  border: 1px solid #c2c2c2;
  color: #535d72;
  border-radius: 3px;
  padding: .1rem .3rem;
  margin: .2rem .2rem 0 0;
  text-align: center;
}

a.post-tags-list-item:hover,
a.post-tags-list-item:visited {
  color: #535d72;
  text-decoration: none;
}

a.post-categories-list-item,
a.post-categories-list-item:hover,
a.post-categories-list-item:visited {
  background-color: #c2c2c2;
  color: #333!important;
  text-decoration: none;
}

a.category-link {
  color: #acb3c2;
  text-decoration: none;
}

#post-toc {
  flex: 0 0 10rem;
  align-self: stretch;
  padding: 1.2rem 1rem;
  background: #f7f8f9;
}

#post-toc .post-toc-inner {
  position: sticky;
  top: 8rem;
  width: 100%;
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
  text-align: left;
}

@media screen and (max-width: 768px) {
  #post-toc {
    display: none;
  }
}

#post-toc .post-toc-title {
  margin: 0 0 .6rem;
  padding-left: .75rem;
  border-left: 2px solid transparent;
  font-size: .85rem;
  font-weight: 600;
  color: #3b4351;
  letter-spacing: .02rem;
  text-transform: uppercase;
}

.increase-font-size {
  text-align: right;
}

.font-size {
  width: 24px;
  height: 24px;
}

#post-content :is(h1, h2, h3, h4, h5, h6) {
  scroll-margin-top: 8rem;
}

#post-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

#post-toc li {
  margin: 0;
}

#post-toc a.post-toc-link {
  display: block;
  padding: .28rem 0 .28rem .75rem;
  font-size: .95rem;
  line-height: 1.4;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

#post-toc a.post-toc-link:hover,
#post-toc a.post-toc-link:focus {
  color: #0070ff!important;
  text-decoration: none;
  opacity: 1;
}

#post-toc a.post-toc-link.active {
  color: #0070ff!important;
  border-left-color: #0070ff;
  font-weight: 500;
  opacity: 1;
}

#post-toc .post-toc-child {
  margin: 0 0 0 .75rem;
}

#post-toc .post-toc-child a.post-toc-link {
  font-size: .85rem;
  opacity: .85;
}

@media (prefers-color-scheme: dark) {
  #post-toc {
    background-color: #393d41;
  }

  #post-toc .post-toc-title {
    color: #d7dae0;
  }

  #post-toc a.post-toc-link:hover,
  #post-toc a.post-toc-link:focus,
  #post-toc a.post-toc-link.active {
    color: #4d9bff!important;
  }

  #post-toc a.post-toc-link.active {
    border-left-color: #4d9bff;
  }
}

#post-card .pagination {
  font-size: .7rem;
  margin: 0;
}

#post-card .post-footer-info {
  text-align: center;
}

#post-card .post-license {
  margin: 0 0 1rem;
  padding: .5rem .8rem;
  border-left: 3px solid #f44336;
  background-color: #f5f5f5;
  list-style: none;
  word-break: break-all;
}

#post-card .post-expired-notify {
  margin: 0 0 1rem;
  padding: .5rem .8rem;
  background: #ffffc0;
  border-left: 3px solid #fff000;
  list-style: none;
}

#post-card .card-footer.post-comment {
  padding: 1.5rem;
  background-color: #eee;
}

/*!* iPhone SE landscape *!*/
/*!* iPad portrait *!*/
/*!* iPhone XS-Max landscape  *!*/
/*!* desktop, iPad landscape *!*/
@media (prefers-color-scheme: dark) {
  #post-card .card-item-container {
    background-color: #3d4246;
  }

  #post-card .card-header {
    border-bottom: .05rem solid #999;
  }
}

#post-card .card-body {
  padding: 1.2rem 0;
  margin: 0 auto;
  max-width: 92%;
}

#post-content .octicon {
  display: inline-block;
  vertical-align: text-top;
  fill: currentColor;
}

#post-content a:active,
#post-content a:hover {
  outline-width: 0;
}

#post-content .highlight code,
#post-content .highlight span,
#post-content code,
#post-content pre {
  font-family: Consolas,"Panic Sans","DejaVu Sans Mono","Bitstream Vera Sans Mono",Menlo,"Microsoft Yahei",monospace!important;
}

#post-content input {
  margin: 0;
  overflow: visible;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

#post-content [type=checkbox] {
  box-sizing: border-box;
  padding: 0;
}

#post-content * {
  box-sizing: border-box;
}

#post-content a {
  background-color: transparent;
  text-decoration: none;
}

#post-content a:hover {
  text-decoration: underline;
}

#post-content strong {
  font-weight: 600;
}

#post-content hr::before {
  display: table;
  content: "";
}

#post-content hr::after {
  display: table;
  clear: both;
  content: "";
}

#post-content td,
#post-content th {
  padding: 0;
}

#post-content h1 {
  padding-bottom: .3rem;
  font-size: 2rem;
  border-bottom: 1px solid #eaecef;
}

#post-content h2 {
  padding-bottom: .3rem;
  font-size: 1.5rem;
  border-bottom: 1px solid #eaecef;
}

#post-content h3 {
  font-size: 1.2rem;
}

#post-content h4 {
  font-size: 1rem;
}

#post-content h5 {
  font-size: .875rem;
}

#post-content h6 {
  font-size: .85rem;
  color: #626569;
}

#post-content p {
  margin-top: 0;
  margin-bottom: 10px;
}

#post-content ol ol,
#post-content ul ol {
  list-style-type: lower-roman;
}

#post-content ol ol ol,
#post-content ol ul ol,
#post-content ul ol ol,
#post-content ul ul ol {
  list-style-type: lower-alpha;
}

#post-content dd {
  margin-left: 0;
}

#post-content pre {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 12px;
  word-wrap: normal;
}

#post-content .octicon {
  vertical-align: text-bottom;
}

#post-content::before {
  display: table;
  content: "";
}

#post-content::after {
  display: table;
  clear: both;
  content: "";
}

#post-content>:first-child {
  margin-top: 0!important;
}

#post-content>:last-child {
  margin-bottom: 0!important;
}

#post-content a:not([href]) {
  color: inherit;
  text-decoration: none;
}

#post-content .anchor {
  float: left;
  padding-right: 4px;
  margin-left: -20px;
  line-height: 1;
}

#post-content .anchor:focus {
  outline: 0;
}

#post-content dl,
#post-content ol,
#post-content p,
#post-content pre,
#post-content table,
#post-content ul {
  margin-top: 0;
  margin-bottom: 16px;
}

#post-content hr {
  box-sizing: content-box;
  height: .1rem;
  padding: 0;
  overflow: hidden;
  margin: .8rem 0;
  background: 0 0;
  background-color: #e1e4e8;
  border-bottom: 1px solid #dfe2e5;
  border: 0;
}

#post-content blockquote {
  margin: 16px 0;
  padding: 0 1rem;
  color: #6a737d;
  border-left: .25rem solid #dfe2e5;
}

#post-content blockquote>:first-child {
  margin-top: 0;
}

#post-content blockquote>:last-child {
  margin-bottom: 0;
}

#post-content h1,
#post-content h2,
#post-content h3,
#post-content h4,
#post-content h5,
#post-content h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

#post-content h1 .octicon-link,
#post-content h2 .octicon-link,
#post-content h3 .octicon-link,
#post-content h4 .octicon-link,
#post-content h5 .octicon-link,
#post-content h6 .octicon-link {
  color: #1b1f23;
  vertical-align: middle;
  visibility: hidden;
}

#post-content h1:hover .anchor,
#post-content h2:hover .anchor,
#post-content h3:hover .anchor,
#post-content h4:hover .anchor,
#post-content h5:hover .anchor,
#post-content h6:hover .anchor {
  text-decoration: none;
}

#post-content h1:hover .anchor .octicon-link,
#post-content h2:hover .anchor .octicon-link,
#post-content h3:hover .anchor .octicon-link,
#post-content h4:hover .anchor .octicon-link,
#post-content h5:hover .anchor .octicon-link,
#post-content h6:hover .anchor .octicon-link {
  visibility: visible;
}

#post-content ul {
  list-style: disc;
}

#post-content ol {
  list-style: decimal;
}

#post-content ol,
#post-content ul {
  padding-left: .5rem;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: .7rem;
}

#post-content>ol,
#post-content>ul {
  margin-bottom: 16px;
}

#post-content ol ol,
#post-content ol ul,
#post-content ul ol,
#post-content ul ul {
  margin-top: 0;
  margin-bottom: 0;
}

#post-content li {
  word-wrap: break-word;
}

#post-content li>p {
  margin-top: 16px;
}

#post-content li+li {
  margin-top: .25rem;
}

#post-content dl {
  padding: 0;
}

#post-content dl dt {
  padding: 0;
  margin-top: 16px;
  font-size: 1rem;
  font-style: italic;
  font-weight: 600;
}

#post-content dl dd {
  padding: 0 16px;
  margin-bottom: 16px;
}

#post-content table {
  border-spacing: 0;
  border-collapse: collapse;
  display: block;
  width: 100%;
  overflow: auto;
}

#post-content table th {
  font-weight: 600;
}

#post-content table td,
#post-content table th {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

#post-content table tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}

#post-content table tr:not(.highlight) {
  background-color: transparent;
}

#post-content table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

#post-content img {
  max-width: 100%;
  border-style: none;
  box-sizing: content-box;
  background-color: #fff;
}

#post-content img[align=right] {
  padding-left: 20px;
}

#post-content img[align=left] {
  padding-right: 20px;
}

#post-content code {
  margin: 0;
  background-color: #eee;
  border-radius: 3px;
}

#post-content pre>code {
  padding: 0;
  margin: 0;
  font-size: 95%;
  word-break: normal;
  white-space: pre;
  border: 0;
}

#post-content>pre:not(.highlight):not(.prettyprint) {
  background: #f5f5f5;
  padding-left: 1rem;
}

#post-content .highlight {
  margin-bottom: 16px;
}

#post-content .highlight table {
  margin-bottom: 0;
}

#post-content .highlight pre {
  margin-bottom: 0;
  word-break: normal;
  background: 0 0!important;
}

#post-content .highlight pre,
#post-content pre {
  padding-top: 1rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  border-radius: 3px;
}

#post-content pre code {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: 1.5;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}

#post-content kbd {
  display: inline-block;
  padding: 3px 5px;
  font: 11px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;
  line-height: 10px;
  color: #444d56;
  vertical-align: middle;
  background-color: #fafbfc;
  border: solid 1px #d1d5da;
  border-bottom-color: #c6cbd1;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 #c6cbd1;
}

#post-content :checked+.radio-label {
  position: relative;
  z-index: 1;
  border-color: #0366d6;
}

#post-content .task-list-item {
  list-style-type: none;
}

#post-content .task-list-item+.task-list-item {
  margin-top: 3px;
}

#post-content .task-list-item input {
  margin: 0 .2rem .25rem -1.6rem;
  vertical-align: middle;
}

#post-content figure.highlight {
  margin: .5rem 0;
}

#post-content figure.highlight pre {
  margin: .5rem 0;
  padding: 0 0 0 10px;
}

#post-content figure.highlight pre span.line {
  padding: 0 10px 0 0;
}

#post-content .highlight td {
  padding: 0;
  border: none;
}

#post-content .highlight table tr {
  border: none;
}

#post-content .prettyprint ol {
  margin: 0;
}

#post-content {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  font-size: .95rem;
  word-wrap: break-word;
  padding-top: 0;
}

#post-content img {
  width: 100%;
}

.card-title.h3.mb-2 {
  color: #303030;
  font-size: 1.9rem;   /* 標題比本文(1.2rem)明顯大 */
  font-weight: 700;    /* 加粗 */
  line-height: 1.3;
}

#post-content a,
#post-content a:focus,
#post-content a:hover,
#post-content a:visited {
  color: #d73e48;
  opacity: 1;
}

#post-content ul li a {
  color: #303030!important;
}

@media only screen and (min-width: 721px) {
  #post-content {
    font-size: 1.1rem;
  }
}

@media only screen and (min-width: 800px) {
  #post-content {
    font-size: 1.2rem;
  }
}

@media only screen and (min-width: 961px) {
  #post-content {
    font-size: 1.1rem;
  }
}

@media only screen and (min-width: 961px) and (max-height: 640px) {
  #post-content {
    font-size: .85rem;
  }

  .line-numbers.highlight.language-javascript {
    max-width: var(--max-width);
  }

  #post-content p {
    max-width: var(--max-width);
  }

  .card-title.h3.mb-2 {
    font-size: 1.7rem;
  }
}

@media (prefers-color-scheme: dark) {
  .card-title.h3.mb-2 {
    color: #eee;
  }

  #post-content code {
    background-color: #555;
  }

  code {
    color: #fff;
  }

  #post-content h1 {
    border-bottom: 1px solid #999;
  }

  #post-content h2 {
    border-bottom: 1px solid #999;
  }

  #post-content a,
  #post-content a:focus,
  #post-content a:hover,
  #post-content a:visited {
    color: #ff868e;
  }

  #post-content blockquote {
    color: #ccc;
  }

  a.post-tags-list-item,
  a.post-tags-list-item:focus,
  a.post-tags-list-item:hover,
  a.post-tags-list-item:visited {
    color: #eee;
  }

  .bg-gray {
    background: #363b40;
  }

  .page-item-title {
    color: #aaa;
  }

  .page-item-subtitle {
    color: #fff;
  }

  #post-content ul li a {
    color: #eee!important;
  }

  #post-content table tr:nth-child(2n) {
    background-color: #464b51;
  }
}

#post-content.series-columns ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

#post-content.series-columns ul li {
  flex: 0 0 50%;
  max-width: 50%;
  box-sizing: border-box;
  position: relative;
  padding-left: 1.2rem;
  padding-right: 1rem;
  margin-top: .4rem;
}

#post-content.series-columns ul li::before {
  content: "\2022";
  position: absolute;
  left: .3rem;
}

#post-content.series-columns ul li+li {
  margin-top: .4rem;
}

@media (max-width: 768px) {
  #post-content.series-columns ul li {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 769px) {
  #post-content.series-columns-4 ul li {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

footer {
  padding: .6rem 1.2rem 1.2rem;
  font-size: .7rem;
  color: #999;
}

.footer-copyright-a,
.footer-copyright-a:visited {
  text-decoration: none;
  color: #999;
}

.footer-copyright-a:focus,
.footer-copyright-a:hover {
  color: #535353;
  text-decoration: underline!important;
}

.footer-text a {
  color: #999;
}

.footer-develop-a,
.footer-develop-a:visited {
  color: #6b6b6b;
}

.footer-develop-a:focus,
.footer-develop-a:hover {
  color: #535353;
}

.footer-develop-divider {
  margin: 0 .3rem;
}

.footer-develop-divider::after {
  content: "|";
}

.social-media {
  width: 18px;
  vertical-align: text-bottom;
}

.tagscloud {
  margin: 0 .2rem .2rem;
  padding: 0 1rem;
  min-height: 20rem;
}

@media screen and (max-width: 960px) {
  .tagscloud {
    min-height: 10rem;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
}

@media screen and (max-width: 480px) {
  .tagscloud {
    min-height: 5rem;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
}

.tagscloud a {
  text-decoration: none;
  padding: .5rem;
  margin: .2rem;
  line-height: 2;
  white-space: nowrap;
  transition: .2s;
  opacity: 1;
  color: #586070;
}

.tagscloud a:hover {
  transition: .2s;
  opacity: .85;
  padding: .75rem;
}

@media (prefers-color-scheme: dark) {
  .tagscloud a {
    color: #eee;
  }
}

.timeline .timeline-item {
  display: flex;
  display: -ms-flexbox;
  margin-bottom: 1.2rem;
  position: relative;
}

.timeline .timeline-item::before {
  background: #e7e9ed;
  content: "";
  height: 100%;
  left: 11px;
  position: absolute;
  top: 1.2rem;
  width: 2px;
}

.timeline .timeline-item .timeline-left {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.timeline .timeline-item .timeline-content {
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 2px 0 2px .8rem;
}

.timeline .timeline-item .timeline-icon {
  border-radius: 50%;
  color: #fff;
  display: block;
  height: 1.2rem;
  text-align: center;
  width: 1.2rem;
}

.timeline .timeline-item .timeline-icon::before {
  border: .1rem solid #5755d9;
  border-radius: 50%;
  content: "";
  display: block;
  height: .4rem;
  left: .4rem;
  position: absolute;
  top: .4rem;
  width: .4rem;
}

.timeline .timeline-item .timeline-icon.icon-lg {
  background: #5755d9;
  line-height: 1.2rem;
}

.timeline .timeline-item .timeline-icon.icon-lg::before {
  content: none;
}

@media (prefers-color-scheme: dark) {
  .timeline .timeline-item .timeline-icon.icon-lg {
    background: #ff868e;
  }

  .timeline .timeline-item .timeline-icon::before {
    border: .1rem solid #ff868e;
  }
}

a.timeline-tile-title,
a.timeline-tile-title span,
a.timeline-tile-title:visited {
  color: #303030;
  opacity: 1;
}

a.timeline-tile-title span:hover {
  color: #454d5d;
  opacity: 1;
}

.tile-title {
  font-size: .9rem;
}

@media screen and (min-width: 721px) {
  .tile-title {
    font-size: 1rem;
  }
}

@media screen and (min-width: 961px) {
  .tile-title {
    font-size: 1rem;
  }
}

@media only screen and (min-width: 961px) and (max-height: 640px) {
  .tile-title {
    font-size: .8rem;
  }
}

@media (prefers-color-scheme: dark) {
  a.timeline-tile-title,
  a.timeline-tile-title span,
  a.timeline-tile-title:visited {
    color: #eee;
  }

  a.timeline-tile-title span:hover {
    color: #ccc;
    opacity: 1;
  }
}

.search-box {
  display: flex;
  justify-content: center;
}

#search-input {
  width: 300px;
}

.search-type-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.search-label {
  display: flex;
  align-items: center;
}

#search-field {
  margin-right: 10px;
}

#search-button {
  margin-left: 10px;
}

#title-only-label {
  cursor: pointer;
}

#full-text-label {
  margin-left: 5px;
  cursor: pointer;
}

#search-input .form-input:focus {
  border-color: rgba(0,0,0,.4);
  box-shadow: 0 0 0 .08rem rgba(0,0,0,.2);
}

#search-input .st-default-search-input {
  background: 0 0;
  padding: 0 .6rem;
}

#search-output {
  min-height: 20rem;
  margin-bottom: 2rem;
}

.search-title {
  font-size: .9rem;
}

@media screen and (max-width: 960px) {
  #search-output {
    min-height: 10rem;
  }
}

@media screen and (max-width: 480px) {
  #search-output {
    min-height: 5rem;
  }
}

#search-output .tile {
  padding-top: .8rem;
  padding-bottom: .8rem;
  border-top: .05rem solid #e7e9ed;
}

#search-result-info {
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.search-result-title {
  margin-bottom: .25rem;
  font-size: .85rem;
  font-weight: 500;
}

.saerch-result-date {
  padding-right: .4rem;
  color: #444;
}

.search-title.search-result-title {
  color: #303030;
  text-decoration: none;
}

.search-title.search-result-title a:hover {
  text-decoration: none;
}

.search-result-summary {
  font-size: .9rem;
  line-height: 1rem!important;
  max-height: 3rem;
  overflow: hidden;
  margin-bottom: 0;
}

.search-noresult {
  padding-top: .5rem;
}

@media screen and (min-width: 721px) {
  .search-title {
    font-size: 1.1rem;
  }

  .search-result-summary {
    font-size: 1rem;
    line-height: 1.6rem!important;
  }
}

@media screen and (min-width: 961px) {
  .search-title {
    font-size: 1.1rem;
  }

  .search-result-summary {
    font-size: 1rem;
    line-height: 1.6rem!important;
  }
}

@media only screen and (min-width: 961px) and (max-height: 640px) {
  .search-title {
    font-size: 1rem;
  }

  .search-result-summary {
    font-size: .8rem;
    line-height: 1.4rem!important;
  }
}

@media (prefers-color-scheme: dark) {
  .search-title.search-result-title {
    color: #eee;
  }

  .saerch-result-date {
    color: #7d89a0;
  }

  #search-output .tile {
    border-top: .05rem solid #666;
  }

  mark {
    background: #555;
    color: #fff;
  }
}

.link-container {
  padding: .4rem 0;
}

@media (min-width: 960px) {
  .link-container {
    padding: .8rem 1.2rem 1.2rem;
  }
}

.link-list {
  padding: 0;
  margin: 0 auto;
  max-width: 15.8rem;
}

@media screen and (min-width: 680px) {
  .link-list {
    max-width: 33.2rem;
  }
}

@media screen and (min-width: 1024px) {
  .link-list {
    max-width: 49.8rem;
  }
}

@media screen and (min-width: 1340px) {
  .link-list {
    max-width: 66.4rem;
  }
}

.link-item {
  margin: .4rem;
  box-shadow: 0 1px 1.5px 1px rgba(0,0,0,.12);
  transition: all .3s;
  height: 3.8rem;
  width: 15rem;
  float: left;
}

.link-item a,
.link-item a:focus,
.link-item a:hover,
.link-item a:visited {
  text-decoration: none;
}

.link-item .link-img img {
  vertical-align: middle;
  height: 3.8rem;
  width: 3.8rem;
}

.link-item .link-content {
  padding-left: .6rem!important;
  padding-right: .6rem!important;
}

.link-item .link-title {
  font-size: .9rem;
  color: #50596c;
}

.link-item .link-descr {
  font-size: .65rem;
}

.column-thumbnail {
  text-align: center;
  background-color: #f2f2f2;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .column-thumbnail {
    background-color: #303439;
  }
}

/* ===== 首頁方格卡片 (grid：手機1欄 / 摺疊機2欄 / 桌機3欄以上) ===== */
.post-grid { position: relative; }
/* 欄數斷點：手機1 / 摺疊機2 / 桌機3 以上（供 masonry.js 讀取） */
.post-grid { --cols: 1; }
@media (min-width: 600px)  { .post-grid { --cols: 2; } }
@media (min-width: 900px)  { .post-grid { --cols: 3; } }
@media (min-width: 1280px) { .post-grid { --cols: 4; } }
@media (min-width: 1600px) { .post-grid { --cols: 5; } }

/* 卡片改為直式：縮圖在上、內文在下（高度隨內容變動） */
.post-grid .post-entry.card {
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}
/* masonry.js 啟用後才絕對定位（無 JS 時退回單欄堆疊，不會重疊） */
.post-grid.is-masonry .post-entry.card {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform .18s ease;
}
.post-grid .post-entry > .columns {
  flex: 1 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
}
.post-grid .post-entry .column-thumbnail,
.post-grid .post-entry .column-body {
  width: 100%;
  max-width: 100%;
  flex: none;
}
.post-grid .post-entry .column-body {
  flex: 1 1 auto;      /* 內文區填滿剩餘高度，footer 貼底對齊 */
  display: flex;
}
.post-grid .post-entry .home-box { width: 100%; }

/* 真實照片縮圖：撐滿卡片寬度、固定比例裁切 */
.post-grid .post-entry .column-thumbnail img.post-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
/* 單字／文法色卡：維持撐滿寬度 */
.post-grid .post-entry .column-thumbnail:has(.word-card) { min-height: 0; }

/* ===== 單篇內文頁：整體字級放大（含標題，因標題用 em 會等比放大） ===== */
#post-content { font-size: 1.2rem; line-height: 1.85; }

/* ===== 「接続」區塊：加框 + 反白強調（底色比照首頁公式框） ===== */
#post-content h2[id="接続"] + ul {
  margin: .6rem 0 1.2rem;
  padding: .7rem .7rem;
  border: 1px solid rgba(215, 62, 72, .28);
  border-radius: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)),
    linear-gradient(135deg, #fdf1ef 0%, #f8e3e4 100%);
  color: #1f5fbf;          /* 首頁公式藍 */
  list-style: none;        /* 去掉項目符號 • */
  line-height: 1.0;        /* 行距縮小 */
  font-size: 1rem;         /* 公式字級小一點 */
  font-weight: 500;        /* 稍微加粗（中等） */
}
#post-content h2[id="接続"] + ul li {
  color: inherit;
  list-style: none;
}
#post-content h2[id="接続"] + ul li + li {
  margin-top: .15rem;      /* 公式各行間距縮小 */
}
/* 框內詞塊：去掉灰底，只留文字 */
#post-content h2[id="接続"] + ul code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #1f5fbf;
}

/* ===== 目前所在頁面對應的 menu 項目：維持藍色，只加粗 ===== */
.navbar-link.active,
.navbar-link.active:link,
.navbar-link.active:hover,
.navbar-link.active:focus,
.navbar-link.active:visited {
  font-weight: 700;
  font-size: 1.1em;
}
