:root {
  --ink: #171816;
  --muted: #696b65;
  --paper: #f4f4f0;
  --panel: #ffffff;
  --line: #d9dad4;
  --accent: #9f3b2f;
}

* { box-sizing: border-box; }

html { background: #ffffff; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  animation: page-cover-fade 1.4s ease-out both;
}

@keyframes page-cover-fade {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

button, input, select { font: inherit; }

.site-header {
  min-height: 76px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 244, 240, .92);
}

.site-header p { margin: 0; color: var(--muted); font-size: .875rem; }
.brand { color: var(--ink); text-decoration: none; font: 700 1rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: .12em; }
.brand span { color: var(--accent); font-size: .68rem; margin-left: .45rem; }
.title{text-decoration:none;font-weight: 700;font-size:1.5em;font-family: serif;color:#000;}



.page-shell { width: min(1440px, 100%); margin: auto; padding: 52px 4vw 72px; }
.intro { display: grid; grid-template-columns: .8fr 1.5fr 1fr; align-items: end; gap: 32px; margin-bottom: 36px; }
.intro h1 { margin: 0; font: 300 clamp(2rem, 4vw, 4rem)/1.25 "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .02em;font-size: 3.4em; }
.intro > p:last-child { margin: 0; color: var(--muted); line-height: 1.4; font-size:0.7em;}
.eyebrow { align-self: start; margin: .7rem 0 0; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .18em; }

.simulator { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); align-items: start; background: var(--panel); border: 1px solid var(--line); }
.preview-column { position: sticky; top: 16px; min-width: 0; border-right: 1px solid var(--line); }
.preview-stage { min-height: 520px; padding: 52px; display: grid; place-items: center; overflow: hidden; background: #e7e7e1; }
.plate { position: relative; width: min(100%, 560px); aspect-ratio: 2.5 / 1; display: grid; place-items: center; overflow: hidden; box-shadow: 0 24px 40px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.15); transition: aspect-ratio .3s ease, background .3s ease; }
.plate::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.14), transparent 30%, rgba(0,0,0,.12)); mix-blend-mode: soft-light; }
.material-black-granite { background-color: #252725; background-image: radial-gradient(circle at 20% 32%, #62645e 0 1px, transparent 2px), radial-gradient(circle at 70% 70%, #74756f 0 1px, transparent 2px), radial-gradient(circle at 42% 80%, #111 0 1px, transparent 2px); background-size: 19px 21px, 25px 27px, 17px 23px; }
.material-white-marble { background: linear-gradient(115deg, transparent 27%, rgba(120,125,120,.18) 28%, transparent 30%), linear-gradient(70deg, #f1f1ed, #d9dad5 48%, #f6f6f2); }
.material-slate { background-color: #464d4d; background-image: repeating-linear-gradient(176deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px); }
.material-wood { background-color: #a16f43; background-image: repeating-linear-gradient(3deg, rgba(65,30,9,.14) 0 2px, transparent 2px 14px), linear-gradient(90deg, #9d6840, #c18c5e 50%, #8e5d39); }
.material-tile { background-color: #d7d0bf; background-image: radial-gradient(ellipse at 30% 25%, rgba(255,255,255,.35), transparent 45%), linear-gradient(135deg, rgba(130,112,83,.14), transparent 40%); }
.material-ceramic-black { background-color: #222; background-image: url("./images/ceramictile-b.webp"); background-size: cover; background-position: center; }
.material-ceramic-white { background-color: #f2f1ed; background-image: url("./images/ceramictile-w.webp"); background-size: cover; background-position: center; }
.material-marble-gray { background-color: #d8d8d6; background-image: url("./images/marble-g.webp"); background-size: cover; background-position: center; }
.material-marble-beige { background-color: #d8c6ae; background-image: url("./images/marble-b.webp"); background-size: cover; background-position: center; }
.material-solid-white { background-color: #f7f6f2; background-image: url("./images/solid-w.webp"); background-size: cover; background-position: center; }
.material-marble-sand { background-color: #54443b; background-image: url("./images/marble-s.webp"); background-size: cover; background-position: center; }
.material-mikage-black { background-color: #292b2a; background-image: url("./images/mikage-b.webp"); background-size: cover; background-position: center; }
.material-mikage-gray { background-color: #d2d3d0; background-image: url("./images/mikage-g.webp"); background-size: cover; background-position: center; }
.swatch.material-ceramic-black { background-image: url("./images/thumb/ceramictile-b.webp"); }
.swatch.material-ceramic-white { background-image: url("./images/thumb/ceramictile-w.webp"); }
.swatch.material-marble-gray { background-image: url("./images/thumb/marble-g.webp"); }
.swatch.material-marble-beige { background-image: url("./images/thumb/marble-b.webp"); }
.swatch.material-solid-white { background-image: url("./images/thumb/solid-w.webp"); }
.swatch.material-marble-sand { background-image: url("./images/thumb/marble-s.webp"); }
.swatch.material-mikage-black { background-image: url("./images/thumb/mikage-b.webp"); }
.swatch.material-mikage-gray { background-image: url("./images/thumb/mikage-g.webp"); }
.plate-copy { position: relative; z-index: 1; width: 84%; display: flex; flex-direction: column; justify-content: center; gap: .2em; }
.plate-text { --letter-color: #FFFFFF; display: block; width: 100%; color: var(--letter-color); line-height: 1.25; letter-spacing: .12em; text-align: center; overflow-wrap: anywhere; text-shadow: none; filter: none; opacity: .82; -webkit-text-stroke: .35px rgba(90, 90, 85, .38); paint-order: stroke fill; mix-blend-mode: normal; transition: font-size .2s ease, color .2s ease; }
.plate-text.outline { color: transparent; opacity: .92; -webkit-text-stroke: 1.25px var(--letter-color); paint-order: stroke; }
.preview-meta { display: flex; justify-content: space-between; gap: 20px; padding: 18px 24px; border-top: 1px solid var(--line); font-weight: 700; }
.preview-meta span:last-child { color: var(--muted); font-weight: 400; }
.material-description { margin: 0; padding: 0 24px 13px; color: var(--ink); font-size: .875rem; line-height: 1.75; }
.preview-note { margin: 0; padding: 0 24px 22px; color: var(--muted); font-size: .78rem; line-height: 1.7; }

.controls { padding: 14px 34px 26px; }
fieldset { margin:15px 0 0; padding: 25px 0; border: 0; border-bottom: 1px solid var(--line); }
legend { width: 100%; margin-bottom: 15px; font-weight: 700; }
legend span { display: inline-block; width: 34px; color: var(--accent); font-size: .75rem; letter-spacing: .08em; }
.field-note { margin: 8px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.material-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.material-group-title { grid-column: 1 / -1; margin: 12px 0 2px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.material-group-title:first-child { margin-top: 0; }
.material-option { min-width: 0; padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); font-size: .7rem; }
.material-option .swatch { display: block; height: 42px; margin-bottom: 6px; border: 2px solid white; outline: 1px solid var(--line); }
.material-option.active .swatch { outline: 2px solid var(--accent); }
.material-option.active { color: var(--ink); font-weight: 700; }
select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 0; background: white; color: var(--ink); }
.text-line-settings + .text-line-settings { margin-top: 18px; }
.text-line-header { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: .8rem; }
.text-line-settings > input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); background: white; color: var(--ink); }
.alignment-options { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
.alignment-option { min-height: 38px; border: 1px solid var(--line); border-right: 0; background: white; color: var(--muted); cursor: pointer; font-size: .8rem; }
.alignment-option:last-child { border-right: 1px solid var(--line); }
.alignment-option.active { border-color: var(--accent); background: var(--accent); color: white; }
.alignment-option.active + .alignment-option { border-left-color: var(--accent); }
.font-line-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.font-line-settings > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .8rem; }
.finish-row { display: grid; grid-template-columns: auto 1fr; gap: 14px 22px; align-items: center; }
.finish-label { color: var(--muted); font-size: .8rem; }
.color-options { display: flex; gap: 9px; }
.color-option { width: 34px; height: 34px; padding: 0; border: 3px solid white; border-radius: 50%; outline: 1px solid var(--line); cursor: pointer; }
.color-option.active { outline: 2px solid var(--accent); }
.slider-label { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.font-size-slider { grid-column: 2; width: 100%; accent-color: var(--accent); }
.control-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; }
.reset-button { padding: 9px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; }
.order-button, .copy-order-button { min-height: 48px; padding: 11px 24px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
.order-button:hover, .copy-order-button:hover { background: #812f26; border-color: #812f26; }
.order-button:focus-visible, .copy-order-button:focus-visible, .cancel-order-button:focus-visible, .order-dialog-close:focus-visible, .ec-order-button:focus-visible, .contact-order-button:focus-visible { outline: 3px solid rgba(159, 59, 47, .3); outline-offset: 3px; }

body.modal-open { overflow: hidden; }
.order-modal[hidden] { display: none; }
.order-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; overflow-y: auto; background: rgba(18, 19, 17, .66); }
.order-dialog { position: relative; width: min(680px, 100%); max-height: calc(100vh - 48px); padding: 38px; overflow-y: auto; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .3); }
.order-dialog-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.8rem; line-height: 1; }
.order-dialog-eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .18em; }
.order-dialog h2 { margin: 0; font: 500 clamp(1.6rem, 4vw, 2.2rem)/1.35 "Yu Mincho", "Hiragino Mincho ProN", serif; }
.order-dialog > p:not(.order-dialog-eyebrow):not(.copy-status) { margin: 12px 42px 22px 0; color: var(--muted); line-height: 1.7; }
.order-slip { margin: 0; padding: 22px; overflow-x: auto; border: 1px solid var(--line); background: #f7f7f4; color: var(--ink); font: inherit; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-dialog-actions { display: flex; gap: 12px; margin-top: 22px; }
.cancel-order-button { min-height: 48px; padding: 11px 24px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.copy-status { min-height: 1.5em; margin: 12px 0 0; color: var(--accent); font-size: .875rem; font-weight: 700; }
.ec-order-links[hidden], .contact-order-area[hidden] { display: none; }
.ec-order-button[hidden] { display: none; }
.ec-order-links, .contact-order-area { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.ec-order-links p, .contact-order-area p { margin: 0 0 12px; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.ec-order-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.ec-order-button, .contact-order-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 14px; border: 1px solid var(--ink); background: var(--ink); color: #fff; text-align: center; text-decoration: none; font-weight: 700; }
.ec-order-button:hover, .contact-order-button:hover { background: #30322e; }
.contact-order-button { width: min(280px, 100%); }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 13px; }
  .intro .eyebrow { margin: 0; }
  .simulator { grid-template-columns: 1fr; }
  .preview-column { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-stage { min-height: 380px; padding: 32px; }
}

@media (max-width: 540px) {
	.intro h1 {font-size:1.2em;}
  .site-header { min-height: 64px; }
  .site-header p { display: none; }
  .page-shell { padding: 32px 16px 48px; }
  .intro { margin-bottom: 24px; }
  .preview-stage { min-height: 300px; padding: 24px 18px; }
  .controls { padding: 8px 20px 22px; }
  .material-grid { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .font-line-grid { grid-template-columns: 1fr; }
  .finish-row { grid-template-columns: 1fr; }
  .font-size-slider { grid-column: 1; }
  .control-footer { align-items: flex-start; flex-direction: column-reverse; }
  .order-button { width: 100%; }
  .order-modal { padding: 12px; }
  .order-dialog { max-height: calc(100vh - 24px); padding: 30px 20px 24px; }
  .order-dialog-actions { flex-direction: column; }
  .copy-order-button, .cancel-order-button { width: 100%; }
  .ec-order-buttons { grid-template-columns: 1fr; }
  .contact-order-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.fortop{
	display:block;
	position:fixed;
	bottom:100px;
	right:5px;
	z-index: 3;
}

.fortop a{
	display: block;
	text-align: center;
	text-decoration: none !important;
	border:1px solid #e1e1e1;
	background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari対応 */
	color:#000;
	width:50px;
	border-radius: 8px;
	padding:10px 0;
	margin: 0 15px -8px 0;
}
.fortop a:hover{
	background: rgba(255, 255, 255, 0.3);
}
.fortop {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
}

.fortop.show {
    opacity: 1;
    visibility: visible;
}
.order p{
	font-size:12px;
	color:#323232;
}
