/* Shared design tokens and photo component for the three approved prototypes.
   Shared parts load after page CSS; page geometry remains local. */
:root{--niche-card-radius:10px;--corner:var(--niche-card-radius);--niche-input-radius:4px;--niche-surface-border:#c0c9b13d;--niche-surface-shadow:0 22px 85px #0d101b99;--niche-panel-radius:5px;--niche-rule:#e4e6da30;--niche-photo-mark:#d1d3c5;--niche-photo-mark-opacity:.42;--niche-focus:#c1c9b1;--niche-heading:'Shippori Mincho B1','Yu Mincho',serif}
/* Shared page chrome: page CSS owns positioning, this file owns spacing. */
body header.page-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;gap:20px;padding:34px 4.5vw}
body header.page-header .brand img{display:block;width:140px;height:auto;margin-top:0;filter:brightness(0);opacity:.62}
.niche-close{min-height:44px;cursor:pointer}.niche-close:focus-visible{outline:2px solid var(--niche-focus);outline-offset:5px}
body footer.niche-footer{width:100%;max-width:1260px;margin:35px auto 0;padding:14px 40px 30px;display:grid;grid-template-columns:1fr auto;gap:16px 35px;align-items:center;color:#d1d8c5;font-size:11px;line-height:1.8;letter-spacing:.05em;opacity:1;flex-shrink:0;position:relative;isolation:isolate}
body footer.niche-footer a{display:inline-block;min-height:44px;padding:12px 0;text-decoration:none;border:0;border-bottom:1px solid #c0c7b44a;color:inherit}
.niche-footer .footer-home{position:relative;width:max-content}.niche-footer .footer-home:before{content:'';position:absolute;top:0;left:0;width:38px;border-top:1px solid #9aa88e70}
.niche-footer .footer-home span{margin-left:18px}.niche-footer nav{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px 25px}.niche-footer nav span{margin-left:8px}
body footer.niche-footer .copyright{grid-column:1/-1;text-align:right;font:10px var(--mincho, Georgia, serif);letter-spacing:.08em;margin:0}
@media(max-width:760px){body header.page-header{padding:23px 22px}body header.page-header .brand img{width:110px}body footer.niche-footer{padding:14px 22px 28px;grid-template-columns:1fr;gap:12px;margin-top:25px}.niche-footer nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:start;align-items:start;gap:10px 12px}.niche-footer nav a:last-child{grid-column:1/-1}.niche-footer nav a{width:max-content;max-width:100%}body footer.niche-footer .copyright{text-align:left}}
/* Service entrances fit the same header/footer; content views remain scrollable. */
html:is([data-contact-view=card],[data-policy-view=card]){overflow:hidden}
:is([data-contact-view=card],[data-policy-view=card]) body{display:flex;flex-direction:column;height:100svh;min-height:0;overflow:hidden}
:is([data-contact-view=card],[data-policy-view=card]) .page-header{flex-shrink:0}
[data-contact-view=card] .contact-stage,[data-policy-view=card] .policy-stage{flex:1;min-height:0;padding:12px 0 24px;container-type:size}
:is([data-contact-view=card],[data-policy-view=card]) .page-card{width:min(300px,72vw,calc((100cqh - 18px)*.5882353))}
@media(max-width:760px) and (max-height:650px){body footer.niche-footer{padding:8px 22px 16px;gap:6px;margin-top:12px}body footer.niche-footer a{min-height:36px;padding:8px 0}.niche-footer nav{row-gap:6px}:is([data-contact-view=card],[data-policy-view=card]) .page-card-name{font-size:18px}:is([data-contact-view=card],[data-policy-view=card]) .page-card-label{bottom:18px}}
.page-photo{margin:0;min-width:0}
.page-photo-button{position:relative;display:block;width:100%;padding:0;border:0;border-radius:var(--niche-card-radius);overflow:hidden;background:#24332d;line-height:0}
.page-photo-button img{display:block;width:100%;height:auto;object-fit:cover}
.page-photo figcaption{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 16px;align-items:start;border-top:1px solid var(--niche-rule);padding-top:18px;margin-top:18px}
.page-photo-record{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:5px;border:0;padding:0;margin:0;color:#b6c1ac;font-size:11px;line-height:1.9;overflow-wrap:anywhere}
.page-photo-record time{font:10px var(--sans, ui-monospace, Consolas, monospace);letter-spacing:.12em}
.page-photo .page-photo-hint{grid-column:2;grid-row:1;display:block;margin:0;max-width:108px;text-align:right;font-size:10px;line-height:1.8;color:#d0d5c5}
.page-photo-hint span{margin-left:6px}
.page-photo-button .scene-watermark,#scene-detail .scene-watermark{right:16px;bottom:16px;width:24px;background:var(--niche-photo-mark);opacity:var(--niche-photo-mark-opacity)}
@media(max-width:760px){.page-photo figcaption{padding-top:14px;margin-top:14px}.page-photo .page-photo-hint{font-size:9px}.page-photo-button .scene-watermark,#scene-detail .scene-watermark{right:12px;bottom:12px;width:22px}}
@media(max-width:400px){.page-photo figcaption{column-gap:12px}.page-photo .page-photo-hint{max-width:100px}}

/* Panel foundation. Never blur the panel itself: only its full-screen backdrop. */
.niche-panel{border:1px solid var(--niche-surface-border);border-radius:var(--niche-panel-radius);background:rgb(var(--niche-surface-rgb,33 44 43) / var(--niche-surface-opacity,.94));box-shadow:var(--niche-surface-shadow);backdrop-filter:none;-webkit-backdrop-filter:none}
.contact-panel.niche-panel{--niche-surface-rgb:27 43 36;--niche-surface-opacity:.83}
.policy-panel.niche-panel{--niche-surface-rgb:27 43 36;--niche-surface-opacity:.90}
dialog.niche-panel::backdrop{background:#11151dc4;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}


/* Adopted footer shading and readable controls; original type sizes retained. */
/* Full-width footer shading: border-image paints beyond the content column without adding horizontal overflow. */
body footer.niche-footer::before{content:"";position:absolute;inset:-110px 0 0;z-index:-1;pointer-events:none;border-image:linear-gradient(180deg,transparent,rgb(13 28 23 / .22) 60%,rgb(13 28 23 / .36)) fill 1 / 0 / 0 100vw;border-radius:0}
body #open-scene.scene-trigger,body .scene-trigger,body .page-photo .page-photo-hint{min-height:44px;color:#d9dfcf}
