:root{
  --paper:#f6e3c8;
  --paper-deep:#d2a977;
  --ink:#28100b;
  --gold:#d79a43;
  --gold2:#ffdfa2;
  --red:#8f1512;
  --red2:#c53628;
  --black:#100b0a;
  --board:#121513;
}
*{box-sizing:border-box}
html{background:#090403}
body.rin-body{
  margin:0;
  min-height:100vh;
  color:#fff1d4;
  font-family:"Kaisei HarunoUmi","Yu Mincho","Hiragino Mincho ProN",serif;
  background:
    radial-gradient(circle at 50% -10%,rgba(151,45,23,.42),transparent 34%),
    linear-gradient(180deg,#080302 0%,#170504 52%,#2a0906 100%);
  -webkit-text-size-adjust:100%;
}
.rin-wrap{
  width:min(100%,720px);
  margin:0 auto;
  padding:0;
}
.rin-card{
  position:relative;
  width:100%;
  overflow:hidden;
  background:#1a0705;
  border-left:1px solid rgba(216,154,67,.45);
  border-right:1px solid rgba(216,154,67,.45);
  box-shadow:0 0 42px rgba(0,0,0,.72);
}
img{max-width:100%;display:block}
.visually-hidden{
  position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.top-main-img,.result-hero-img{width:100%;height:auto}

/* top */
.rin-top-card{padding-bottom:22px}
.rin-error{
  width:calc(100% - 40px);
  margin:14px auto 0;
  padding:12px 14px;
  border:1px solid rgba(255,210,141,.55);
  border-radius:14px;
  background:rgba(80,0,0,.72);
  color:#ffe4d2;
  font-weight:700;
  line-height:1.6;
  text-align:center;
  box-shadow:0 0 18px rgba(0,0,0,.35) inset;
}
.rin-form{
  width:calc(100% - 36px);
  margin:-17% auto 0;
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.38));
}
.rin-honeypot{
  position:absolute!important;
  left:-10000px!important;
  top:auto!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.form-head,.form-foot{width:100%;position:relative;z-index:1}
.form-mid{
  margin-top:-1px;
  margin-bottom:-1px;
  padding:16px 56px 8px;
  background:url("images/form2.webp") center top / 100% 100% no-repeat;
}
.ingredient-row{
  display:grid;
  grid-template-columns:128px 1fr;
  align-items:center;
  gap:12px;
  margin:0 0 16px;
}
.ingredient-label img{width:100%;filter:drop-shadow(0 3px 2px rgba(0,0,0,.28))}
.ingredient-row input{
  width:100%;
  min-height:58px;
  padding:14px 18px;
  border:2px solid #ba8d65;
  border-radius:13px;
  background:linear-gradient(180deg,#fffdfa,#fff3e0);
  color:#2b160e;
  font-family:"Kaisei HarunoUmi","Yu Mincho",serif;
  font-size:20px;
  font-weight:700;
  outline:none;
  box-shadow:inset 0 2px 8px rgba(65,29,10,.12),0 2px 0 rgba(255,255,255,.55);
}
.ingredient-row input::placeholder{color:#a8907b;font-weight:500;font-size:17px}
.ingredient-row input:focus{
  border-color:#b01212;
  box-shadow:0 0 0 4px rgba(177,25,18,.14), inset 0 2px 8px rgba(65,29,10,.12);
}
.form-bottom{position:relative;margin-top:-3%}
.image-submit{
  position:absolute;
  z-index:3;
  left:50%;bottom:24.5%;
  transform:translateX(-50%);
  width:58%;
  aspect-ratio:1080/233;
  border:0;
  border-radius:18px;
  background:url("images/btnSend.webp") center / contain no-repeat;
  cursor:pointer;
  padding:0;
  appearance:none;
  -webkit-appearance:none;
  filter:drop-shadow(0 7px 5px rgba(0,0,0,.3));
}
.image-submit:active{transform:translateX(-50%) translateY(3px);filter:drop-shadow(0 3px 3px rgba(0,0,0,.28))}
.rin-family-note{
  width:calc(100% - 36px);
  margin:16px auto 0;
  padding:16px 18px 12px;
  border:1px solid rgba(205,151,70,.55);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(27,20,18,.94),rgba(15,12,11,.96));
  text-align:center;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.55);
}
.family-copy{
  margin:0 0 10px;
  color:#ffd68a;
  font-size:18px;
  font-weight:700;
  letter-spacing:.03em;
}
.rin-note{
  margin:0;
	padding: 1em;
  color:rgba(255,225,185,.74);
  font-family:"Yu Gothic","Hiragino Sans",sans-serif;
  font-size:12px;
  line-height:1.75;
	text-align: center;
}

/* result common */
.result-design,.failure-design{padding-bottom:28px;background:#110604}
.advice-box{
  position:relative;
  width:calc(100% - 40px);
  margin:-26% auto 0 auto;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.42));
}
.advice-box img{width:100%}
.advice-box p{
  position:absolute;
  left:27%;
  right:5.2%;
  top:23%;
  bottom:12%;
  margin:0;
  display:flex;
  align-items:center;
  color:#2d120c;
  font-size:clamp(17px,3.25vw,24px);
  line-height:1.2;
  font-weight:700;
  text-shadow:0 1px 0 rgba(255,255,255,.35);
}
.recipe-board{
  width:calc(100% - 42px);
  margin:-6% auto 0 auto;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.45));
}
.board-top{
  width:100%;
  height:auto;
  aspect-ratio:963 / 222;
  background:url("images/recipeBack1.webp") center top / 100% 100% no-repeat;
}
.board-mid{
  margin-top:-1px;margin-bottom:-1px;
  padding:0 48px 2px;
  background:url("images/recipeBack2.webp") center top / 100% 100% no-repeat;
}
.board-bottom{
  width:100%;
  aspect-ratio:963 / 230;
  background:url("images/recipeBack3.webp") center bottom / 100% 100% no-repeat;
	padding-top: 3%;
	margin-bottom: 2em;
}.board-mid h2{
  margin:-28px 0 22px;
  color:#fff0d2;
  text-align:center;
  font-size:clamp(33px,7vw,50px);
  line-height:1.12;
  letter-spacing:.06em;
  text-shadow:0 2px 0 #000,0 0 15px rgba(255,224,163,.18);
}
.recipe-line{
  display:grid;
  grid-template-columns:48px 1fr;
  gap:11px;
  align-items:start;
  min-height:74px;
  margin:0 0 14px;
  padding:12px 15px 12px 10px;
  border:1px solid rgba(197,145,70,.52);
  border-radius:8px;
  background:rgba(16,14,12,.45);
}
.line-icon img{width:38px;height:38px;object-fit:contain;opacity:.82}
.line-body h3{
  margin:0 0 4px;
  color:#f7bd62;
  font-size:clamp(19px,4.2vw,27px);
  line-height:1.25;
  letter-spacing:.03em;
}
.line-body p,.line-body li{
  color:#fff4db;
  font-size:clamp(17px,3.8vw,24px);
  line-height:1.58;
  font-weight:700;
  text-shadow:0 1px 0 #000;
}
.line-body p{margin:0}
.line-body ul,.line-body ol{margin:0;padding-left:1.3em}
.line-body b{color:#ffd085}
.warning-line{border-color:rgba(184,61,48,.7);background:rgba(80,20,18,.34)}

.unused-line{border-color:rgba(184,61,48,.76);background:rgba(82,16,14,.30)}
.unused-line .line-body h3,
.unused-line .unused-name,
.unused-line .unused-comment,
.unused-line p{
  color:#ff8f8f;
}
.unused-line .line-body h3{margin-bottom:6px}
.unused-items{display:grid;gap:8px}
.unused-items p{margin:0;line-height:1.58;font-weight:700;text-shadow:0 1px 0 #000}
.unused-name{font-weight:700}
.tool-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:8px;
}
.tool-grid span,
.tool-grid a{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:58px;
  height:auto;
  padding:9px 30px 9px 10px;
  border:2px solid #d98b2f;
  border-radius:12px;
  background:
    linear-gradient(180deg,rgba(65,40,25,.96) 0%,rgba(27,18,14,.98) 45%,rgba(11,8,7,.98) 100%);
  color:#f8ead1;
  text-align:center;
  font-size:clamp(15px,3.2vw,21px);
  font-weight:700;
  line-height:1.22;
  letter-spacing:.03em;
  text-decoration:none;
  text-shadow:
    0 2px 0 #000,
    0 0 8px rgba(255,223,168,.18);
  box-shadow:
    inset 0 0 0 1px rgba(255,214,135,.42),
    inset 0 3px 0 rgba(255,255,255,.10),
    inset 0 -3px 0 rgba(0,0,0,.42),
    0 0 0 1px rgba(60,21,8,.95),
    0 4px 0 rgba(62,24,9,.95),
    0 8px 14px rgba(0,0,0,.34),
    0 0 12px rgba(225,116,31,.20);
  transition:
    transform .12s ease,
    filter .12s ease,
    box-shadow .12s ease;
}
.tool-grid a::before,
.tool-grid span::before{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:9px;
  border:1px solid rgba(255,207,111,.42);
  pointer-events:none;
}
.tool-grid a::after{
  content:"›";
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-54%);
  color:#f7d07b;
  font-size:1.55em;
  line-height:1;
  font-weight:900;
  text-shadow:
    0 2px 0 #000,
    0 0 8px rgba(255,193,76,.45);
}
.tool-grid a:hover{
  transform:translateY(-2px);
  filter:brightness(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(255,222,153,.56),
    inset 0 3px 0 rgba(255,255,255,.14),
    inset 0 -3px 0 rgba(0,0,0,.40),
    0 0 0 1px rgba(60,21,8,.95),
    0 6px 0 rgba(62,24,9,.95),
    0 12px 18px rgba(0,0,0,.38),
    0 0 16px rgba(225,116,31,.32);
}
.tool-grid a:active{
  transform:translateY(3px);
  filter:brightness(.98);
  box-shadow:
    inset 0 0 0 1px rgba(255,214,135,.38),
    inset 0 2px 0 rgba(255,255,255,.08),
    inset 0 -2px 0 rgba(0,0,0,.38),
    0 0 0 1px rgba(60,21,8,.95),
    0 1px 0 rgba(62,24,9,.95),
    0 5px 9px rgba(0,0,0,.30),
    0 0 9px rgba(225,116,31,.18);
}
.tool-grid a:focus-visible{
  outline:3px solid rgba(255,220,140,.95);
  outline-offset:4px;
}
.result-actions{
  display:grid;
  gap:14px;
  width:calc(80% - 84px);
  margin:0 auto;
}
.result-actions.single{margin-top:20px}
.image-button{
  display:block;
  width:100%;
  aspect-ratio:1080/233;
  text-indent:-9999px;
  overflow:hidden;
  background:center / contain no-repeat;
  filter:drop-shadow(0 8px 6px rgba(0,0,0,.34));
}
.image-button:active{transform:translateY(3px);filter:drop-shadow(0 4px 4px rgba(0,0,0,.3))}
.retry-button{background-image:url("images/btnRetry.webp")}
.recipe-button{aspect-ratio:1080/159;background-image:url("images/btnRecipe.webp");width: 80%;margin: auto;}
.bottom-note{text-align:center;color:rgba(255,224,184,.7)}
.miss-board{width:calc(100% - 40px);margin:10px auto 0;filter:drop-shadow(0 10px 14px rgba(0,0,0,.45))}
.miss-board img{width:100%}

.x-share-button{
  aspect-ratio:1080/233;
  background-image:url("images/XshareBtn.webp");
  width:100%;
  margin:0 auto 2em auto;
}

@media (max-width:560px){
  .rin-wrap{width:100%;padding-bottom:18px}
  .rin-card{border-left:0;border-right:0}
  .rin-form{width:calc(100% - 18px)}
  .form-mid{padding:10px 26px 4px;background-size:100% 100%}
  .ingredient-row{grid-template-columns:92px 1fr;gap:8px;margin-bottom:10px}
  .ingredient-row input{min-height:46px;padding:10px 12px;font-size:16px;border-radius:10px}
  .ingredient-row input::placeholder{font-size:12px}
  .image-submit{width:62%;bottom:20%}
  .rin-family-note{width:calc(100% - 22px);padding:12px 12px 10px}
  .family-copy{font-size:15px}
  .rin-note{font-size:10.5px}
  .advice-box{width:calc(100% - 20px)}
  .advice-box p{left:27%;right:5%;top:22%;bottom:11%;font-size:clamp(14px,3.7vw,18px);line-height:1.2}
  .recipe-board{width:calc(100% - 20px);margin-top:-5%}
  .board-mid{padding:0 26px 1px}
  .board-mid h2{margin:-20px 0 14px;font-size:clamp(30px,8.6vw,42px)}
  .recipe-line{grid-template-columns:36px 1fr;gap:8px;padding:9px 10px 10px 8px;margin-bottom:9px;min-height:58px}
  .line-icon img{width:30px;height:30px}
  .line-body h3{font-size:clamp(18px,5.2vw,22px);margin-bottom:3px}
  .line-body p,.line-body li{font-size:clamp(16px,4.6vw,19px);line-height:1.52}
  .tool-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .tool-grid span,
  .tool-grid a{
    min-height:54px;
    padding:9px 42px 9px 16px;
    border-radius:14px;
    font-size:clamp(16px,4.8vw,20px);
  }
  .tool-grid a::before,
  .tool-grid span::before{
    inset:4px;
    border-radius:10px;
  }
  .tool-grid a::after{
    right:16px;
    font-size:1.9em;
  }
  .result-actions{width:calc(100% - 42px);gap:10px;margin-top:10px}
  .miss-board{width:calc(100% - 20px)}
  .bottom-note{width:calc(100% - 30px);font-size:10.5px}
}
@media (max-width:390px){
  .ingredient-row{grid-template-columns:78px 1fr}
  .form-mid{padding-left:20px;padding-right:20px}
  .ingredient-row input::placeholder{font-size:11px}
  .advice-box p{font-size:13.5px;line-height:1.4}
  .board-mid{padding-left:22px;padding-right:22px}
  .line-body p,.line-body li{font-size:15.5px}
  .tool-grid{grid-template-columns:1fr}
}

/* 魔界家族トップへボタン */
.mkz-bottom-nav {
  width: 100%;
  text-align: center;
  margin: 60px auto 24px;
}

.mkz-top-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.mkz-top-link img {
  width: 220px !important;
  max-width: 40vw !important;
  height: auto;
  display: block;
}

.mkz-top-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.mkz-top-link:active {
  transform: translateY(1px) scale(0.98);
}

/* スマホ微調整 */
@media (max-width: 640px) {
  .mkz-bottom-nav {
    margin: 40px auto 20px;
  }

  .mkz-top-link img {
    width: 40vw;
    min-width: 140px;
    max-width: 190px;
  }
}

body.is-loading{
  overflow:hidden;
}
.rin-loading[hidden]{display:none!important}
.rin-loading{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(9,4,3,.74);
  backdrop-filter:blur(3px);
}
.rin-loading__inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
}
.rin-loading__image{
  width:min(44vw,240px);
  min-width:140px;
  height:auto;
  image-rendering:auto;
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.32));
}
.rin-loading__text{
  margin:0;
  padding:8px 16px;
  color:#fff1d4;
  font-size:clamp(16px,4vw,22px);
  font-weight:700;
  line-height:1.4;
  text-align:center;
  text-shadow:0 2px 6px rgba(0,0,0,.55);
}