:root {
  color-scheme: light;
  --page: #f6efe5;
  --paper: #fffaf2;
  --ink: #30201b;
  --dim: #735d53;
  --red: #9a392e;
  --red-dark: #782820;
  --gold: #dfba7c;
  --dark: #2d1816;
  --edge: #e0d0bf;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "MS PMincho", serif;
  --sans: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.65 var(--sans); }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a35c32; outline-offset: 4px; }
:where(section[id]) { scroll-margin-top: 1.2rem; }
.shell { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 12px; transform: translateY(-160%); z-index: 5; background: var(--paper); padding: 9px 14px; }
.skip-link:focus { transform: none; }
.site-header { background: #291614; color: #fff2de; border-bottom: 1px solid #ffffff19; }
.header-inner { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { font-family: var(--serif); font-size: 1.27rem; letter-spacing: .07em; font-weight: 700; white-space: nowrap; text-decoration: none; display: inline-flex; gap: .65rem; align-items: center; }
.brand-mark { font-family: Georgia, serif; color: var(--gold); font-size: 1.5rem; line-height: 1; }
.header-inner nav { display: flex; gap: clamp(1rem, 3.3vw, 2.65rem); color: #ebdbc8; font-size: .91rem; }
.header-inner nav a, .footer-inner a { text-decoration: none; }
.header-inner nav a:hover, .footer-inner a:hover { text-decoration: underline; text-underline-offset: .3em; }
.header-action { font-size: .88rem; font-weight: 700; text-decoration: none; border: 1px solid #a97761; border-radius: 6px; padding: .58rem .88rem; }
.header-action:hover { background: #ffffff12; }
.header-store { gap: 1rem; }
.header-store nav { gap: clamp(.8rem, 2.3vw, 1.8rem); }
.header-actions { display: flex; gap: .5rem; align-items: center; }
.header-actions .header-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; white-space: nowrap; }
.header-purchase { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.header-purchase:hover { background: #f2ca8d; color: var(--dark); }
@media (min-width: 701px) and (max-width: 900px) {
  .header-store { flex-wrap: wrap; padding-top: .55rem; row-gap: .3rem; }
  .header-store nav { flex-basis: 100%; order: 1; justify-content: center; padding-bottom: .5rem; }
}
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff3df;
  background:
    radial-gradient(ellipse at 50% 20%, #62372b 0, transparent 53%),
    radial-gradient(ellipse at 9% 72%, #4e2220 0, transparent 54%),
    linear-gradient(175deg, #311e1a, var(--dark));
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .23; pointer-events: none;
  background-image: radial-gradient(circle at 2px 2px,#f6d9a956 .7px, transparent 1px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse, transparent 27%,black 120%);
}
.hero-inner { position: relative; padding: clamp(37px, 4.1vw, 60px) 0 clamp(29px, 3.3vw, 44px); }
.season { display: flex; align-items: center; justify-content: center; gap: .76rem; color: #f2c785; font-size: .89rem; font-weight: 700; letter-spacing: .23em; margin: 0 0 14px; }
.season span { height: 5px; width: 5px; transform: rotate(45deg); background: currentColor; }
h1, h2, h3, p { margin-block-start: 0; }
h1, h2 { font-family: var(--serif); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4.7vw, 4.3rem); letter-spacing: .035em; line-height: 1.37; margin: 0; text-wrap: balance; }
.hero-copy { margin: 12px 0 20px; color: #f0ddca; font-size: clamp(.93rem, 1.45vw, 1.09rem); line-height: 1.86; }
.hero-action, .save-button { display: inline-flex; align-items: center; justify-content: center; padding: .72rem 1.52rem; min-height: 46px; background: #e7ba78; border: 1px solid #e7ba78; border-radius: 6px; text-decoration: none; color: #311b15; font-weight: 700; }
.hero-action:hover { background: #f2ca8d; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }
.hero-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .64rem 1rem; border: 1px solid #d8aa73; border-radius: 6px; color: #fff0dc; text-decoration: none; font-weight: 700; }
.hero-secondary:hover { background: #ffffff16; }
.hero-inner:has(.hero-designs) { padding-top: clamp(21px, 3vw, 42px); }
.hero-inner:has(.hero-designs) > nav.hero-copy { margin: 0 0 .75rem; }
.hero-inner:has(.hero-designs) > p.hero-copy { max-width: 55rem; margin-inline: auto; text-wrap: balance; }
.hero-designs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.45rem, 2vw, 1.25rem);
  list-style: none; width: min(100%, 550px); padding: 0; margin: 0 auto 1rem;
}
.hero-designs li { display: flex; flex-direction: column; gap: .45rem; }
.hero-designs img {
  display: block; width: 100%; height: auto; border: 1px solid #a88975; border-radius: 6px;
  background: #e7d7c6;
}
.hero-designs p { margin: 0; color: #f0ddca; font-size: .86rem; line-height: 1.5; text-align: start; }
.hero-designs strong { display: block; color: #fff3df; }
.hero-design-edit {
  min-height: 44px; width: 100%; padding: .28rem .2rem; border: 1px solid #c69a70;
  border-radius: 5px; background: #35211f; color: #fff3df; font-size: .86rem; font-weight: 700;
}
.hero-design-edit:hover { background: #62372b; }
.hero-design-edit:focus-visible { outline-color: #f2c785; }
.gallery { background: linear-gradient(var(--dark) 0 180px,var(--page) 180px); padding-bottom: clamp(35px, 5vw, 70px); }
.gallery-top { display: flex; justify-content: space-between; align-items: end; gap: 1rem; color: #fff0dc; padding-bottom: 17px; }
.gallery:has(.gallery-intro) { background: var(--page); overflow: clip; }
.gallery-top:has(.gallery-intro) { position: relative; isolation: isolate; }
.gallery-top:has(.gallery-intro)::before {
  content: ""; position: absolute; inset: 0 -100vw -36px; z-index: -1; background: var(--dark);
}
.gallery:has(.gallery-intro) .cards { position: relative; }
.gallery-top h2 { margin: 0; font-size: clamp(1.43rem, 2.7vw, 2.02rem); letter-spacing: .05em; }
.gallery-top p { color: #e5c6ad; font-size: .88rem; margin: 2px 0 0; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: .46rem; padding-bottom: 3px; }
.filters button { min-height: 39px; border: 1px solid #a88975; color: #fff1de; background: #35211f; border-radius: 5px; padding: .39rem .76rem; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.filters button:hover { border-color: #f5d4a6; }
.filters button[aria-pressed="true"] { background: #f1dcc0; color: #3d241d; border-color: #f1dcc0; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card { min-width: 0; background: var(--paper); border: 1px solid #d6bda8; border-radius: 7px; overflow: hidden; box-shadow: 0 5px 16px #32201a0d; }
.card-art { display: block; overflow: hidden; background: #e7d7c6; aspect-ratio: 1181 / 1748; }
.card-art img { display: block; object-fit: cover; width: 100%; height: 100%; transition: transform 220ms ease; }
.card-art:hover img { transform: scale(1.025); }
.card-art:focus-visible { outline-offset: -4px; }
.card-meta { padding: .9rem .81rem .77rem; min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.card-meta h3 { margin: 0; font-size: .98rem; line-height: 1.45; letter-spacing: .015em; overflow-wrap: anywhere; }
.card-meta p { margin: .17rem 0 0; color: var(--dim); font-size: .84rem; }
.card-actions { display: flex; align-items: center; gap: .34rem; flex-shrink: 0; }
.card-actions a, .card-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: .28rem .48rem; border: 1px solid var(--edge); background: transparent; border-radius: 5px; color: var(--red-dark); text-decoration: none; font-size: .86rem; font-weight: 700; white-space: nowrap; }
.card-actions button { color: #fff9f1; background: var(--red); border-color: var(--red); }
.card-actions button:hover { background: var(--red-dark); }
.card-actions a:hover { background: #f2e8d9; }
.hero-design-detail { display: block; }
.template-detail { width: min(980px, calc(100% - 48px)); padding-block: 1.1rem clamp(2rem, 5vw, 4rem); }
.template-breadcrumbs { color: var(--dim); font-size: .86rem; margin-bottom: clamp(1rem, 3vw, 2rem); }
.template-breadcrumbs a { text-underline-offset: .2em; }
.template-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 365px); gap: clamp(1.4rem, 5vw, 4rem); align-items: center; }
.template-category { margin: 0; color: var(--red-dark); font-size: .88rem; font-weight: 700; }
.template-copy h1 { font: 700 clamp(1.75rem, 3.8vw, 3rem)/1.3 var(--serif); margin: .35rem 0 .8rem; }
.template-description { font-weight: 650; }
.template-copy p { margin-block: .55rem; }
.template-copy .template-note { color: var(--dim); font-size: .86rem; }
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.15rem; }
.template-actions a { padding-block: .5rem; text-underline-offset: .23em; }
.template-preview { margin: 0; text-align: center; }
.template-preview a { display: block; }
.template-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 7px; box-shadow: 0 12px 32px #32201a19; }
.template-preview figcaption { margin-top: .45rem; color: var(--dim); font-size: .83rem; }
.template-wording { background: var(--paper); border-left: 3px solid var(--red); padding: .8rem 1rem; }
.template-wording p { margin: .2rem 0; }
.template-related .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .template-intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .template-preview { width: min(100%, 340px); margin-inline: auto; }
  .template-related .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gallery-note { font-size: .9rem; color: var(--dim); margin-top: 16px; }
.info, .faq { border-top: 1px solid #dac9b7; padding-block: clamp(33px, 5vw, 62px); }
.info h2, .faq h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); margin: 0 0 .6rem; letter-spacing: .035em; }
.info-title p { margin: 0; color: var(--dim); line-height: 1.78; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.steps li { background: var(--paper); border-left: 3px solid #a54b3d; padding: 17px 19px; }
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--dim); }
.design-types .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.design-types a { text-underline-offset: .2em; }
.design-type-links { display: flex; flex-wrap: wrap; gap: .5rem 1.35rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.design-type-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--red-dark); }
.design-types + .gallery .gallery-top { padding-top: 1.2rem; }
.guide-tools { display: grid; gap: 16px; margin-block: 24px; }
.guide-tool {
  min-width: 0; padding: clamp(16px, 2.8vw, 28px); background: var(--paper);
  border: 1px solid var(--edge); border-radius: 7px;
}
.guide-tool h2 { margin-bottom: .45rem; font-size: clamp(1.18rem, 2.2vw, 1.6rem); line-height: 1.4; }
.guide-tool p { margin-bottom: .9rem; color: var(--dim); }
.guide-tool .save-button { width: auto; padding-inline: .85rem; text-align: center; }
.guide-tool .save-button:hover { background: var(--red); border-color: var(--red); }
.guide-pack-price { white-space: nowrap; }
.guide-tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.guide-tool-actions a:not(.save-button) {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--red-dark); text-underline-offset: .2em;
}
.guide-print-pack:has(figure) { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.guide-print-sample { flex: 0 0 clamp(76px, 16%, 112px); margin: 0; text-align: center; }
.guide-print-sample img { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 4px; }
.guide-print-sample figcaption { margin-top: .25rem; color: var(--dim); font-size: .75rem; }
@media (min-width: 850px) {
  .guide-tools:has(> :nth-child(2)) { grid-template-columns: 1.2fr 1fr; }
}
.print-guide-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(255px, 350px); align-items: start; gap: 24px; margin-top: 24px; }
.print-guide-content .steps { grid-template-columns: 1fr; list-style: decimal; margin: 0; padding-inline-start: 1.35rem; }
.print-guide-content li::marker { color: var(--red-dark); font-weight: 700; }
.print-guide-content figure { margin: 0; }
.print-guide-content img { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 6px; }
.print-guide-content figcaption { margin-top: .45rem; color: var(--dim); font-size: .88rem; }
@media (max-width: 700px) {
  .print-guide-content { grid-template-columns: 1fr; }
  .print-guide-content figure { max-width: 350px; }
}
.faq { display: grid; grid-template-columns: minmax(170px, .7fr) 2fr; gap: 28px; }
.faq details { border-bottom: 1px solid var(--edge); }
.faq details:first-child { border-top: 1px solid var(--edge); }
.faq summary { cursor: pointer; padding: 13px 30px 13px 0; list-style: none; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 7px; top: 12px; color: var(--red-dark); font-size: 1.13rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--dim); }
.site-footer { background: var(--dark); color: #ebd7c3; }
.footer-inner { min-height: 91px; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-size: .86rem; }
dialog { width: min(900px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; background: var(--paper); color: var(--ink); border: 1px solid var(--edge); border-radius: 9px; overflow-y: auto; }
dialog::backdrop { background: #21110fd6; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 21px; border-bottom: 1px solid var(--edge); background: #f4e7d9; }
.dialog-top p { margin: 0; font-size: .91rem; color: var(--dim); }
.dialog-top h2 { font-size: 1.28rem; margin: 0; line-height: 1.45; }
.close { background: transparent; color: var(--ink); border: 1px solid #c6b3a0; border-radius: 5px; line-height: 1; width: 43px; height: 43px; font-size: 1.6rem; }
.close:hover { background: #eadac8; }
.save-login { width: min(430px, calc(100% - 24px)); }
.save-login-content { display: grid; gap: .85rem; padding: 18px 21px; }
.save-login-content p { margin: 0; }
.save-login-content [role="status"]:empty { display: none; }
.save-login-content :is(.header-action, .save-button) { text-align: center; text-decoration: none; }
.design-preview-open { position: fixed; top: var(--design-preview-top); width: 100%; }
#design-preview {
  width: min(560px, calc(100% - 24px));
  height: min(780px, calc(100vh - 24px));
  height: min(780px, calc(100dvh - 24px));
  max-height: none;
  overscroll-behavior: contain;
}
.design-preview-layout { display: grid; height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
.design-preview-layout .dialog-top { gap: 12px; padding: 6px 12px; }
.design-preview-layout .dialog-top h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.design-preview-layout .close { width: 44px; height: 44px; flex: 0 0 auto; }
.design-preview-stage { display: grid; place-items: center; min-width: 0; padding: 8px; background: #eddfce; }
.design-preview-stage img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.design-preview-state { text-align: center; }
.design-preview-state p, .design-preview-actions p { margin: 0 0 .4rem; font-size: .9rem; }
.design-preview-actions { padding: 8px 12px; border-top: 1px solid var(--edge); }
.design-preview-state button, #retry-card { min-height: 44px; padding: .35rem .7rem; color: var(--red-dark); background: var(--paper); border: 1px solid var(--edge); border-radius: 5px; }
.editor-content { display: grid; grid-template-columns: minmax(0,1fr) minmax(215px,1fr); gap: 22px; padding: 21px; }
.editing-preview { margin: 0; display: grid; place-items: start center; background: #eddfce; padding: 12px; border-radius: 6px; }
.editing-preview canvas { width: min(100%,320px); height: auto; box-shadow: 0 4px 14px #281a1850; aspect-ratio: 1181/1748; }
.edit-controls { display: grid; align-content: start; gap: 8px; }
.edit-controls label { font-weight: 700; }
.edit-controls :is(input[type="text"],textarea,input[type="file"]) { width: 100%; border: 1px solid #ab8f7d; padding: .56rem .66rem; background: #fffefd; color: var(--ink); border-radius: 5px; font-size: 1rem; }
.edit-controls textarea { resize: vertical; }
.color-control { display: flex; align-items: center; gap: 12px; }
.color-control input { min-height: 32px; min-width: 45px; padding: 2px; border: 1px solid var(--edge); }
#photo-controls > label { display: block; margin-block: 5px; }
.field-note, .edit-status { font-size: .9rem; color: var(--dim); margin: .22rem 0; }
.edit-status { min-height: 1.1em; }
.edit-status[data-error="true"] { color: #9e2721; }
.photo-options { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; }
.photo-options label { font-size: .86rem; }
.photo-options input { width: 100%; accent-color: var(--red); }
.save-button { background: var(--red-dark); border-color: var(--red-dark); color: #fff4e9; width: 100%; }
.save-button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1050px) {
  .cards { gap: 15px; }
  .card-meta { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 30px); }
  .header-inner { min-height: 60px; gap: .55rem; }
  .header-inner nav { display: none; }
  .header-actions { gap: .35rem; }
  .header-actions .header-action { padding-inline: .6rem; }
  .header-register { display: none; }
  .brand { font-size: 1.13rem; }
  .hero-inner:has(.hero-designs) .season { margin-bottom: .42rem; }
  .hero-inner:has(.hero-designs) > p.hero-copy { margin-block: .5rem .88rem; }
  .hero-designs p, .hero-design-edit { font-size: .76rem; }
  .gallery { background: linear-gradient(var(--dark) 0 235px, var(--page) 235px); }
  .gallery-top { display: grid; gap: .62rem; padding-bottom: .72rem; }
  .filters { gap: .32rem; }
  .filters button { font-size: .84rem; padding-inline: .57rem; }
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 10px; }
  .card-meta { padding: .55rem .59rem; gap: .4rem; display: grid; }
  .card-meta h3 { font-size: .91rem; }
  .card-actions a, .card-actions button { min-height: 42px; flex: 1; }
  .steps, .faq { grid-template-columns: 1fr; gap: 12px; }
  .design-types .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-types .steps li { padding: .65rem .68rem; }
  .footer-inner .brand { font-size: 1rem; }
  .footer-inner { flex-wrap: wrap; padding-block: 14px; }
}
@media (max-width: 360px) {
  .header-store { flex-wrap: wrap; justify-content: center; row-gap: .45rem; padding-block: .5rem; }
}
@media (max-width: 525px) {
  .editor-content { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .editing-preview { padding: 7px; }
  .editing-preview canvas { width: min(60%,175px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.file-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.file-picker { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 40px; padding: .3rem .65rem; border: 1px solid #ab8f7d; border-radius: 5px; font-weight: 700; background: #f3e7d9; }
.file-picker:focus-within { outline: 3px solid #a35c32; outline-offset: 3px; }
.file-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#photo-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: .9rem; }

.gallery-error { color: var(--red-dark); border: 1px solid #d8a28d; border-radius: 5px; margin: 0 .59rem .65rem; padding: .45rem .55rem; font-size: .85rem; }
.account { max-width: 700px; padding-block: 2.5rem 4rem; }
.account h1 { font-size: clamp(1.8rem, 4vw, 2.65rem); }
.account h2 { font-size: 1.25rem; }
.account-card { display: grid; gap: .75rem; padding: 1rem 1.2rem; margin: 1rem 0; background: #fffaf2; border: 1px solid #e0d0bf; border-radius: 7px; }
.account-card h2, .account-card p { margin: 0; }
.account-card input { width: 100%; padding: .55rem; border: 1px solid #ab8f7d; border-radius: 5px; }
.account-card button { justify-self: start; background: #782820; color: #fff4e9; padding: .55rem .86rem; border: 1px solid #782820; border-radius: 5px; }
.account-card button:disabled { opacity: .5; cursor: wait; }
.balance { display: flex; flex-wrap: wrap; gap: .7rem 1.8rem; margin: 0; }
.balance dt { color: #735d53; }
.balance dd { margin: 0; font-weight: 700; }
#payment-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.analytics-consent { position: fixed; inset: auto 12px 12px auto; max-width: min(440px,calc(100% - 24px)); z-index: 4; background: #fffaf2; color: #30201b; padding: .8rem 1rem; border: 1px solid #e0d0bf; border-radius: 6px; box-shadow: 0 3px 16px #39211933; }
.analytics-consent p { margin: 0 0 .5rem; }
.analytics-consent-actions { display: flex; gap: .6rem; }
.analytics-consent button { background: #782820; color: #fff4e9; border: 1px solid #782820; border-radius: 4px; padding: .36rem .62rem; }
.analytics-consent button + button { background: #fffaf2; color: #782820; }
.analytics-preferences { text-decoration: underline; background: transparent; border: 0; color: inherit; padding: .2rem 0; }
