/*
Theme Name: 右左口の里
Theme URI: https://kofu-sato.jp/
Author: Ri-to.
Description: 右左口の里専用WordPressテーマ。施設、写真、料金、リンクを管理画面から更新できます。
Version: 1.2.9
Text Domain: ubaguchi
*/

/* Feed 1 keeps its layout settings in Instagram Feed. */
.ub-instagram-feed { width: calc(100% - 32px); max-width: 1280px; margin: 32px auto 48px; }
.ub-instagram-feed .sbi_header,
.ub-instagram-feed #sbi_load { display: none !important; }

/* Original banner has baked-in edge rules; hide only its outer strips. */
img[src*="/udon-koma1.png"] {
  -webkit-clip-path: inset(4% 0.2% 4% 0);
  clip-path: inset(4% 0.2% 4% 0);
}

html { scroll-behavior: smooth; }
body { margin: 0; }
.ubaguchi-admin-content a { color: #15803d; text-decoration: underline; }
.ubaguchi-admin-content p { margin: 0 0 1rem; }
.ubaguchi-admin-content ul { list-style: disc; padding-left: 1.25rem; }
.ubaguchi-admin-content table { width: 100%; border-collapse: collapse; }
.ubaguchi-admin-content th,.ubaguchi-admin-content td { padding: .45rem; border-bottom: 1px solid #d1d5db; text-align: left; }
.ubaguchi-facility-image { width: 100%; height: 310px; object-fit: cover; border-radius: 48% 52% 45% 55% / 54% 42% 58% 46%; }
.ubaguchi-notice { padding: .75rem 1rem; margin: 1rem auto; max-width: 600px; border-radius: .5rem; background: #dcfce7; color: #14532d; }
.ubaguchi-form input,.ubaguchi-form textarea { box-sizing: border-box; }
.ubaguchi-form .required { color: #b91c1c; font-size: .75rem; }
.swiper { overflow: hidden; }
/* Keep the logo fish's original 45-degree angle between occasional hops. */
@keyframes ub-logo-fish-hop {
 0%, 91%, 100% { transform: translateY(0) rotate(45deg); }
 94% { transform: translateY(-6px) rotate(35deg); }
 97% { transform: translateY(0) rotate(49deg); }
}
body > main > header h1 > div.rotate-45 {
 animation: ub-logo-fish-hop 9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
 body > main > header h1 > div.rotate-45 { animation: none; }
}
@media print {
 body > main > header h1 > div.rotate-45 { animation: none; }
}
@keyframes ub-reveal-up {
 from { opacity: 0; transform: translateY(18px); }
 to { opacity: 1; transform: translateY(0); }
}
.ub-reveal-once { animation: ub-reveal-up .7s ease-out both; }
@media (prefers-reduced-motion: reduce) {
 .ub-reveal-once { animation: none; }
}
@media print {
 .ub-reveal-once { animation: none; opacity: 1; transform: none; }
}
.ub-hero-caption {
 color: #fff;
 -webkit-text-stroke: 2px #285438;
 paint-order: stroke fill;
 text-shadow: 1px 1px 0 #285438, -1px -1px 0 #285438, 1px -1px 0 #285438, -1px 1px 0 #285438;
}
.swiper-wrapper { display: flex; }
.swiper-slide { flex: 0 0 100%; }
[data-ubaguchi-slider] { display: grid; }
[data-ubaguchi-slider] > .swiper-slide {
 grid-area: 1 / 1; width: 100%; min-width: 0;
 opacity: 0; pointer-events: none; transition: opacity 1.2s ease-in-out;
}
[data-ubaguchi-slider] > .swiper-slide:first-child { opacity: 1; }
[data-ubaguchi-slider] > .swiper-slide[aria-hidden="true"] { opacity: 0; }
[data-ubaguchi-slider] > .swiper-slide.ub-slide-active { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
 [data-ubaguchi-slider] > .swiper-slide { transition: none; }
}
@media (max-width: 767px) { .ubaguchi-facility-image { height: 280px; } }

/* Dedicated rules: dynamic WordPress content must not depend on uncompiled utilities. */
body { overflow-wrap: break-word; }
.ub-decorated-heading { margin: 0 0 2rem; font: inherit; }
[class*="bar-1.svg"] { background-image: url('assets/images/SVG/bar-1.svg'); background-repeat: repeat-x; background-size: auto 100%; }
.ub-facilities > .container { padding: 0 .5rem; }
.ub-facility-entry { margin-bottom: 2rem; }
.ub-facility-entry .ubaguchi-admin-content { font-size: 14px; line-height: 1.9; padding-bottom: 4rem; }
.ub-facility-entry svg[viewBox] { width: 100%; height: auto; }
.ubaguchi-admin-content img { max-width: 100%; height: auto; }
.ubaguchi-admin-content h3 { font-size: 20px; line-height: 1.6; }
.ubaguchi-admin-content h4 { font-weight: 700; margin: 1.25rem 0 .75rem; }
.ubaguchi-admin-content ul.flex { list-style: none; padding-left: 0; }
.ubaguchi-admin-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.ubaguchi-admin-content .wp-block-button__link { display: inline-block; padding: .65rem 1.2rem; border-radius: .4rem; }
.ub-pricing { margin: 3rem auto 4rem; }
.ub-price-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
.ub-price-grid > * { min-width: 0; }
.ub-price-grid h3 { font-size: 14px; color: #166534; margin-bottom: .75rem; }
.ub-price-grid p:empty { display: none; }
.ub-price-grid ul { font-size: 12px; line-height: 1.8; }
.ub-price-grid .flex > span:last-child { flex-shrink: 0; }
.ub-food .ubaguchi-admin-content a { color: white; }
.ub-access { padding: 2rem .75rem; }
.ub-access dl { font-size: 14px; line-height: 1.9; }
.ub-access dt { font-weight: 700; }
.ub-access dd { margin: 0 0 .6rem; }
.ub-access iframe { width: 100%; height: 340px; border: 0; }
.ub-gotentaki { margin-bottom: 2rem; }
.ub-news-item { padding: 1rem 0; border-bottom: 1px solid #d1d5db; }
.ub-news-item h3 { margin: .4rem 0; }
.ub-reservation { padding: 2rem 1rem; margin: 2rem auto; }
.ubaguchi-form { width: 100%; max-width: 600px; padding: 0 1rem; margin: 2rem auto; }
.ubaguchi-form label { font-size: 14px; line-height: 1.7; }
.ubaguchi-form input:not([type=checkbox]):not([type=hidden]),.ubaguchi-form textarea { display: block; width: 100%; background: #fff; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: .4rem; min-height: 44px; }
.ubaguchi-form p,.ubaguchi-form fieldset { margin-bottom: 1rem; }
.ubaguchi-form button { padding: .6rem 1.5rem; min-height: 44px; border-radius: .4rem; }
.ubaguchi-form :focus-visible { outline: 3px solid #166534; outline-offset: 3px; }
.ubaguchi-form button:disabled { opacity: .55; cursor: not-allowed; }
.ubaguchi-admin-content figure { margin: 1rem 0; }
body.admin-bar header { top: 32px; }
[id] { scroll-margin-top: 100px; }
@media (min-width: 768px) {
 .ub-price-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .ub-access dl:not(:has(>div)) { display: grid; grid-template-columns: 6em 1fr; gap: .75rem; }
}
@media (max-width: 782px) { body.admin-bar header { top: 46px; } }
@media (max-width: 767px) {
 .ub-facility-entry .ubaguchi-admin-content { padding-bottom: 2rem; }
 .ub-price-grid { gap: 1rem; }
 .ub-price-grid h3 { font-size: 12px; }
 .ub-price-grid li.flex { flex-wrap: wrap; gap: .25rem; }
 .ub-decorated-heading img { width: 44px; height: 44px; }
 .ub-decorated-heading span { font-size: 20px; }
 .ubaguchi-form { padding: 0 .5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Apply the original normalized SVG outline to the editable hero slider. */
.swiper { -webkit-clip-path: url(#slider_clipPath); clip-path: url(#slider_clipPath); }

/* Wave, address and copyright occupy separate rows, rather than a 160px overlay. */
footer > div:last-child {
 height: auto;
 display: flex;
 flex-direction: column;
 background: #333;
}
footer > div:last-child > img {
 position: static !important;
 display: block;
 width: 100% !important;
 height: auto !important;
 object-fit: contain !important;
 background: #d9f99d;
 margin-bottom: -1px;
}
footer > div:last-child > div {
 position: static;
 width: 100%;
 max-width: 1280px;
 margin-left: auto;
 margin-right: auto;
 padding: 1rem 1.5rem;
 box-sizing: border-box;
}
footer > div:last-child > div:nth-child(2) {
 align-items: flex-end;
 line-height: 1.8;
}
footer > div:last-child > div:last-child { text-align: center; }
@media (max-width: 767px) {
 footer > div:last-child > div:nth-child(2) { align-items: flex-start; font-size: 13px; }
}
