/* IDATSUKA — トップの「部屋」と「お知らせ」（刷新③：静けさの中の火）
   ふだんは墨と象牙色だけ。写真も色を抑える。朱は細い線と印だけに使い、触れたときに下から熾火の光が立つ。
   css/home.css の後に読み込み、部屋・お知らせの見た目を上書きする。動きは js/home-rooms.js。 */
:root { --c-shu: #C2412B; --c-ember: 224, 102, 47; --c-ivory: #EDE6DA; }
:root[data-theme="light"] { --c-shu: #A8331F; --c-ember: 194, 78, 30; }

/* ひとこと */
.vow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: end; padding: var(--s-6) 0 var(--s-2); }
.vow p { margin: 0; font-family: var(--f-mincho); font-weight: 400; font-size: clamp(21px, 2.8vw, 32px); letter-spacing: .16em; line-height: 1.95; }
.vow p span { display: inline-block; }
.vow em { font-style: normal; color: var(--c-shu); }
.vow small { font-family: var(--f-serif); font-style: italic; font-size: 14px; letter-spacing: .2em; color: var(--c-sub); }

/* 見出し：右の端だけ朱に染まる線 */
.rm .sec-head, .nw .sec-head { justify-content: flex-start; border-bottom: 0; }
.sec-rule { flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, var(--c-line), var(--c-line) 70%, var(--c-shu)); }

/* 写真：ふだんは静か、触れると色が戻る */
.ph-q { filter: grayscale(.55) brightness(.62) contrast(1.05); transition: filter 1.4s var(--ease-calm), transform 2.4s cubic-bezier(.2,.7,.2,1); }
.fire { position: relative; overflow: hidden; isolation: isolate; }
.fire::before { content: ""; position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgb(var(--c-ember)), var(--c-shu), transparent); opacity: 0; transform: scaleX(.2); transition: opacity .9s, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.fire::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: radial-gradient(120% 60% at 50% 115%, rgba(var(--c-ember), .32), rgba(var(--c-ember), 0) 60%); opacity: 0; transition: opacity 1.2s; }
.fire:hover .ph-q, .fire:focus-visible .ph-q { filter: grayscale(0) brightness(.84) contrast(1.05); transform: scale(1.035); }
.fire:hover::before, .fire:focus-visible::before, .fire.is-new::before { opacity: 1; transform: scaleX(1); }
.fire:hover::after, .fire:focus-visible::after { opacity: 1; }
.rm a:focus-visible, .nw a:focus-visible { outline: 1px solid var(--c-shu); outline-offset: 3px; }

/* 部屋：観る。を横長の大きな一枚に（固定） */
.rm-wrap { padding: var(--s-4) 0 var(--s-2); }
.rm-hall { display: block; aspect-ratio: 21 / 9; max-width: 100%; background: #171513; color: var(--c-ivory); }
.rm-hall img, .rm-door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rm-hall img { object-position: center 30%; }
.rm-shade { position: absolute; inset: 0; z-index: 1; }
.rm-hall .rm-shade { background: linear-gradient(90deg, rgba(8,7,6,.72) 0%, rgba(8,7,6,.15) 55%, rgba(8,7,6,0) 100%); }
.rm-hall .rm-cap { position: absolute; z-index: 2; left: clamp(20px, 4vw, 64px); right: 20px; bottom: clamp(20px, 4vw, 52px); max-width: 560px; display: grid; gap: 4px; }
.rm-hall i, .rm-door i { font-family: var(--f-serif); font-style: italic; font-size: 14px; letter-spacing: .2em; color: #B89A66; }
.rm-hall b { font-family: var(--f-mincho); font-weight: 400; font-size: clamp(40px, 5.6vw, 72px); letter-spacing: .16em; line-height: 1.25; }
.rm-hall .rm-en, .rm-door .rm-en { color: rgba(237,230,218,.85); }
.rm-hall .rm-desc { color: rgba(237,230,218,.82); margin-top: 8px; }
.rm-hall .rm-work { font-family: var(--f-mincho); font-size: 12.5px; letter-spacing: .14em; color: rgba(237,230,218,.7); }
.rm-seal { position: absolute; z-index: 3; top: 20px; right: 20px; padding: 6px 12px; background: var(--c-shu); color: #F6EEE2; font-family: var(--f-mincho); font-size: 13px; letter-spacing: .24em; line-height: 1.5; box-shadow: inset 0 0 0 1px rgba(246,238,226,.25); text-align: center; }
.rm-seal small { display: block; font-family: var(--f-serif); font-size: 11.5px; letter-spacing: .14em; }

/* 残りの七つ：縦長の扉を横一列に。名前は掛け軸のように縦書き */
.rm-doors { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.rm-door { display: block; aspect-ratio: 2 / 3; background: #171513; color: var(--c-ivory); }
.rm-door .rm-shade { background: linear-gradient(0deg, rgba(8,7,6,.8) 0%, rgba(8,7,6,.2) 50%, rgba(8,7,6,.35) 100%); }
.rm-door .rm-cap { position: absolute; z-index: 2; inset: 18px 14px 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.rm-door b { font-family: var(--f-mincho); font-weight: 400; font-size: clamp(19px, 1.8vw, 23px); display: flex; flex-direction: column; align-items: center; gap: .28em; line-height: 1; }
.rm-door b span { display: block; }
.rm-door .rm-foot { display: grid; gap: 2px; }
.rm-door .rm-en { font-size: 11px; letter-spacing: .16em; line-height: 1.6; }
.rm-new { position: absolute; z-index: 3; top: 14px; right: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rm-new i { display: grid; place-items: center; width: 24px; height: 24px; background: var(--c-shu); color: #F6EEE2; font-family: var(--f-mincho); font-style: normal; font-size: 12.5px; letter-spacing: 0; animation: rm-ember 3.2s ease-in-out infinite; }
.rm-new small { font-family: var(--f-serif); font-size: 12px; letter-spacing: .12em; color: var(--c-ivory); }
@keyframes rm-ember { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--c-ember), 0); } 50% { box-shadow: 0 0 14px 2px rgba(var(--c-ember), .45); } }
@media (hover: none) { .rm-hall .ph-q { filter: grayscale(.2) brightness(.72); } }
@media (max-width: 960px) {
  .vow { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); padding-top: var(--s-5); }
  .rm-hall { aspect-ratio: 4 / 3; }
  .rm-doors { grid-template-columns: repeat(7, 40%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .rm-doors li { scroll-snap-align: start; }
}
@media (max-width: 520px) { .rm-doors { grid-template-columns: repeat(7, 56%); } }

/* お知らせ：小さな写真つき。いちばん新しい一件は大きく */
.nw-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.nw-list li { position: relative; }
.nw-list a { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px 0; }
.nw-list a::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--c-shu); transition: width .9s cubic-bezier(.2,.7,.2,1); }
.nw-list a:hover::after { width: 100%; }
.nw-list a:hover .nw-title { color: inherit; }
.nw-ph { position: relative; display: block; width: 84px; aspect-ratio: 1 / 1; overflow: hidden; background: #171513; }
.nw-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nw-list a:hover .ph-q { filter: grayscale(0) brightness(.9); transform: scale(1.06); }
.nw-body { display: grid; gap: 2px; min-width: 0; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.nw-list time { color: var(--c-accent); }
.nw-room { color: var(--c-sub); }
.nw-title { font-size: 16px; text-wrap: balance; }
.nw-list li.nw-top { grid-column: 1 / -1; }
.nw-list li.nw-top a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; padding: 8px 0 28px; }
.nw-list li.nw-top .nw-ph { width: 100%; aspect-ratio: 16 / 9; }
.nw-list li.nw-top .nw-ph::before { content: "新"; position: absolute; z-index: 1; top: 12px; left: 12px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--c-shu); color: #F6EEE2; font-family: var(--f-mincho); font-size: 13px; }
.nw-list li.nw-top .nw-title { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: .12em; margin-top: 8px; }
.nw-more a { transition: border-color var(--d-1) var(--ease-calm), color var(--d-1) var(--ease-calm); }
.nw-more a:hover { border-color: var(--c-shu); }
@media (max-width: 760px) {
  .nw-list { grid-template-columns: minmax(0, 1fr); }
  .nw-list a { grid-template-columns: 72px minmax(0, 1fr); }
  .nw-ph { width: 72px; }
  .nw-list li.nw-top a { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-q, .fire::before, .fire::after, .nw-list a::after { transition: none; }
  .rm-new i { animation: none; }
}
