/* ティアラ・山平・吉野 共通のきまり（静的サイトにしたときに足したもの）
   各サイトの色は 1色だけ（--accent）。ページの頭で決める：ティアラ #cf2e2e／山平 #9773b8／吉野 #ff6600
   くわしくは「3サイト共通_デザインのきまり.md」 */

/* 文字：ゴシック 1種類。本文 15px・行間 1.9 */
body, body *, input, textarea {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif !important;
}
.post { font-size: 15px; line-height: 1.9; letter-spacing: .02em; }
.post p { line-height: 1.9; }
.post span[style*="font-size"] { font-size: inherit !important; } /* ページごとに直に指定された大きさはそろえる */
#sidebar { font-size: 13px; line-height: 1.8; }
h2.title { font-size: 16px; font-weight: bold; letter-spacing: .02em; }
.post h2 { font-size: 19px; font-weight: bold; line-height: 1.6; }

/* 写真・地図は枠の幅に収める */
.post img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

/* 料理・プランのカード：名前（色）→ 値段（太字）→ 添え書き → 中身。左そろえ */
.tm { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 32px 24px; margin: 1.2em 0 2.4em; }
.tm__item { flex: 0 0 calc((100% - 48px) / 3); text-align: left; }
.tm--2 .tm__item { flex-basis: calc((100% - 24px) / 2); }
.tm--1 .tm__item { flex-basis: 100%; }
.tm p { margin: 0; padding: 0; }
.tm .tm__name { margin: 0 0 .3em; font-size: 1.05em; font-weight: bold; color: var(--accent); line-height: 1.5; }
.tm .tm__price { font-weight: bold; }
.tm .tm__note { margin: .15em 0 0; font-size: .9em; }
.tm .tm__list + .tm__note { margin-top: .6em; }
.post .tm__list { display: block; margin: .8em 0 0; padding: 0; list-style: none; text-align: left; line-height: 1.9; }
.post .tm__list li { margin: 0; padding: 0; list-style: none; background: none; }
.tm__photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 .7em; }
.tm__nophoto { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; margin: 0 0 .7em; background: #f2efe8; color: #999; font-size: .85em; }
.tm-notes { margin: 0 0 2em; text-align: left; font-size: .9em; line-height: 1.9; }
@media (max-width: 599px) {
  .tm__item, .tm--2 .tm__item { flex-basis: calc((100% - 24px) / 2); }
  .tm--2 .tm__item:has(.tm__list) { flex-basis: 100%; }
}

/* そろえ方：本文は左そろえ。値段の段落も右に寄せず、1行目（値段）を太字に */
.post .has-text-align-right, .post p[style*="text-align: right"] { text-align: left !important; }
.post p.has-text-align-right::first-line { font-weight: bold; }

/* 改行：見出しは行の長さをそろえ、日本語は語の切れ目で折る。本文は最後の行に 1〜2文字だけ残さない */
h1, h2, h3, h4, h5, .tm__name, .seven h3 { text-wrap: balance; word-break: auto-phrase; }
.post p, .post li, #sidebar { text-wrap: pretty; }
.nb { display: inline-block; } /* 見出しの文ごとのまとまり。文の途中では折らない */

/* 上のメニュー（PC）：3サイトとも同じ枠。高さ 40px、横幅いっぱいに同じ幅で並べ、区切りは細い実線 */
@media only screen and (min-width: 1025px) {
  nav#mainNav .panel { float: none; width: 100%; }
  nav#mainNav ul { display: flex; width: 100%; }
  nav#mainNav ul li a strong, nav#mainNav ul li a span { white-space: nowrap; }
  nav#mainNav ul li { float: none; flex: 1 1 0; border-right: 1px solid #e3ddd3; }
  nav#mainNav ul li:first-child { border-left: 1px solid #e3ddd3; }
  nav#mainNav ul li a { height: 40px; line-height: 40px; padding: 12px 6px 6px; }
  nav#mainNav ul li a strong { font-size: 13px; }
  nav#mainNav ul li a span { font-size: 10px; letter-spacing: .06em; }
  #mainImg { margin-top: 16px; } /* メニューと大きな写真のあいだを 3サイトとも同じだけ空ける */
}

/* 色の帯の見出し：文字を帯の端に付けない（字下げの全角スペースの代わり） */
.post .wp-block-group.has-background > .wp-block-group__inner-container { padding: .35em 1em; }
.post .wp-block-group.has-background h1, .post .wp-block-group.has-background h2 { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }

.closed-link { margin-top: 1em; }
.closed-link a { color: var(--accent); text-decoration: underline; }

/* 色の帯の見出しの上下：前の写真・文章とくっつけない、下の本文とも間をあける */
.post .wp-block-group.has-background { margin: 2.4em 0 1.2em; }
.post > .wp-block-group.has-background:first-child { margin-top: 0; }
.post .wp-block-media-text { margin-bottom: 1.2em; }

/* 余白（空気）：3サイトとも同じ。8px を単位にたっぷりめ */
.post { padding: 40px 40px 24px; }
.post p { padding-bottom: 0; margin: 0 0 1.4em; }
.post > :first-child { margin-top: 0 !important; }
.post h1 { margin: 2.6em 0 1em; padding: 0 0 .4em; }
.post h2 { margin: 2.4em 0 1em; padding: 0 0 .4em; }
.post h3 { margin: 2em 0 .8em; }
.post .wp-block-image, .post figure { margin: 2em 0; }
.post .wp-block-image figure, .post .wp-block-media-text figure, .post .tm figure { margin: 0; }
.post .wp-block-media-text { margin: 2em 0 2.4em; }
.post .wp-block-media-text__content { padding: 0 2em; }
.post .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { padding: 0 2em 0 0; }
.post .wp-block-media-text:not(.has-media-on-the-right) .wp-block-media-text__content { padding: 0 0 0 2em; }
.post hr, .post .wp-block-separator { margin: 2.8em auto; }
.post .wp-block-group.has-background { margin: 3.2em 0 1.6em; }
.tm { gap: 40px 32px; margin: 2em 0 3.2em; }
.tm__item { flex-basis: calc((100% - 64px) / 3); }
.tm--2 .tm__item { flex-basis: calc((100% - 32px) / 2); }
.tm-notes { margin: -1.2em 0 2.8em; }
h2.title { margin-top: 40px; padding: 12px 16px; }
h2.title.first { margin-top: 0; } /* ページのいちばん上の題は、横の欄の頭とそろえる（元のテーマと同じ） */
#mainImg { margin-bottom: 8px; }
#sidebar section, #sidebar .widget { margin-bottom: 28px; }
#sidebar .textwidget, #sidebar .widget_text { line-height: 1.9; }
#footer { padding-top: 24px; padding-bottom: 24px; }
#copyright { padding: 16px; font-size: 12px; letter-spacing: .04em; }
@media (max-width: 644px) {
  .post { padding: 24px 20px 12px; }
  .post .wp-block-media-text__content,
  .post .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content,
  .post .wp-block-media-text:not(.has-media-on-the-right) .wp-block-media-text__content { padding: 1.2em 0 0; }
}

/* 文字の大きさの段階（3サイト共通）
   ページの題 17／帯の見出し 19／見出し 18／小見出し 16／本文 15／カードの名前 16／中身 14／注意書き（※）13／横の欄 13／メニュー 13・10／著作権 12 */
h2.title { font-size: 17px; letter-spacing: .04em; }
.post h1 { font-size: 19px; font-weight: bold; letter-spacing: .04em; line-height: 1.6; }
.post h2 { font-size: 18px; letter-spacing: .03em; }
.post h3 { font-size: 16px; font-weight: bold; letter-spacing: .03em; }
.post p, .post li, .post .wp-block-verse, .post td, .post th { font-size: 15px; line-height: 1.95; }
.post .has-small-font-size, .post .has-normal-font-size { font-size: 15px !important; }
.post .has-medium-font-size { font-size: 17px !important; }
.post .has-large-font-size, .post .has-larger-font-size, .post .has-huge-font-size { font-size: 20px !important; }
.post .wp-block-verse { font-family: inherit; white-space: normal; }
.post p.note { font-size: 13px; line-height: 1.85; color: #666; }
.tm .tm__name { font-size: 16px; }
.tm .tm__price { font-size: 15px; }
.tm .tm__note { font-size: 13px; }
.post .tm__list li { font-size: 14px; }
.tm__item { min-width: 0; } /* 長い名前でカードが広がって 2つずつになるのを防ぐ */
.tm-notes { font-size: 13px; color: #666; }

/* 写真＋文章のブロック：横並び（ユーザー指示で縦積みから戻した）
   大きい写真（mt-photo）：写真の列 50%（ユーザー指示で広げた）、写真は列の幅いっぱい・切り抜かない
   小さい画像・イラスト（mt-side）：画像の列 32%、元の大きさより大きくしない */
.post .wp-block-media-text.mt-photo { display: grid; grid-template-columns: 1fr 1fr !important; gap: 0 2em; align-items: start; }
.post .wp-block-media-text.mt-photo.has-media-on-the-right { grid-template-columns: 1fr 1fr !important; }
.post .mt-photo .wp-block-media-text__media img { display: block; width: 100%; height: auto; }
.post .mt-photo .wp-block-media-text__content { padding: 0 !important; }
.post .wp-block-media-text.mt-side { display: grid; grid-template-columns: 32% 1fr !important; gap: 0 2em; align-items: start; }
.post .wp-block-media-text.mt-side.has-media-on-the-right { grid-template-columns: 1fr 32% !important; }
.post .mt-side .wp-block-media-text__media img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.post .mt-side .wp-block-media-text__content { padding: 0 !important; }
@media (max-width: 644px) {
  .post .wp-block-media-text.mt-side, .post .wp-block-media-text.mt-side.has-media-on-the-right,
  .post .wp-block-media-text.mt-photo, .post .wp-block-media-text.mt-photo.has-media-on-the-right { display: block; }
  .post .mt-side .wp-block-media-text__media, .post .mt-photo .wp-block-media-text__media { margin: 0 0 1.2em; }
}

/* 横幅：広い画面（1140px 以上）では 960 → 1080px に。本文 800／横の欄 240／あいだ 40 */
@media only screen and (min-width: 1140px) {
  #wrapper, .inner { width: 1080px; }
  #content { width: 800px; }
  #sidebar { width: 240px; }
  #sidebar img { max-width: 100%; height: auto; }
  #mainImg img { width: 1080px; max-width: 100%; height: auto; }
  .thumbWrap { width: 825px; }
}

/* 3列のカードは名前を 15px に（長い名前を 1行に収める）。中身のかっこ書きは下に小さく */
.tm:not(.tm--2):not(.tm--1) .tm__name { font-size: 15px; }
.post .tm__list li .tm__sub { display: block; padding-left: 1em; font-size: 12.5px; line-height: 1.7; color: #666; }

/* 本文の写真・帯の画像・動画・地図は枠いっぱいに（小さい画像は元の大きさのまま） */
.post img.fullw { display: block; width: 100% !important; height: auto !important; max-width: 100%; }
.post figure:has(> img.fullw), .post figure.is-resized:has(img.fullw), .post p:has(> img.fullw), .post a:has(> img.fullw) { width: 100% !important; max-width: 100%; }
.post .wp-block-embed iframe, .post iframe[src*="youtube"] { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.post iframe[src*="google.com/maps"] { display: block; width: 100%; height: 360px; }

/* 写真＋文章：写真も文章も上端にそろえる（WordPress の標準は上下の真ん中） */
.post .wp-block-media-text > .wp-block-media-text__media, .post .wp-block-media-text > .wp-block-media-text__content { align-self: start; }
.post .mt-after { margin-top: -0.4em; }
.post .mt-after > hr:first-child { margin-top: 0; }

/* 「・」の行の下のかっこ書きは、「・」のあとの文字の頭にそろえ、少し小さく */
.post .sub-line { display: inline-block; padding-left: 1em; font-size: 13px; line-height: 1.8; color: #666; }

/* 値段・見出しの約物（《》（）「」など）の余分なアキを詰める */
.tm__price, .tm__name, .post h1, .post h2, .post h3, h2.title, .post p.has-text-align-right::first-line { font-feature-settings: "palt"; }

/* ヘッダーのロゴ（SVG）は画面の幅に収める */
#header img { max-width: 100%; height: auto; }

/* ヘッダーの電話番号（ティアラ・山平）：ロゴとは別の画像にして、メニューの右端にそろえて大きく */
#header .htel { float: right; line-height: 0; }
#header .htel img { max-width: 100%; height: auto; }
#header .htel--tiara { margin-top: 30px; }
#header .htel--tiara img { width: 380px; }
#header .htel--yamahei { margin-top: 10px; }
#header .htel--yamahei img { width: 538px; }
@media only screen and (max-width: 959px) {
  #header .htel { margin-right: 10px; }
  #header .htel--tiara img { width: 320px; }
  #header .htel--yamahei { margin-top: 20px; }
  #header .htel--yamahei img { width: 440px; }
}
@media only screen and (max-width: 644px) {
  #header .htel { float: none; display: block; margin: 14px auto 6px; text-align: center; }
  #header .htel--tiara img { width: 280px; }
  #header .htel--yamahei img { width: 300px; }
}

/* 横の欄の添え書き（吉野の「（ホテルグランマリアージュ）」）：言葉の途中で折らず、1行で小さく */
#sidebar .side-sub { display: inline-block; white-space: nowrap; font-size: 12px; color: #666; }
