/* ===== Tokens ===== */
:root{
  --bg:#ffffff;     /* ほぼ白のクリーム */
  --fg:#111111;
  --muted:#6f747a;
  --line:#ece5de;   /* ヘアライン */
  --accent:#f2e6d7; /* 差し色（薄） */
  --radius:14px;
  --maxw:720px;
}

/* ===== Base ===== */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  color:var(--fg);
  background:var(--bg);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  font-size:clamp(13px, 1.2vw, 14.5px); /* 小さめを維持しつつ可変 */
  letter-spacing:.01em;
}

/* ===== Layout ===== */
.wrap{
  max-width:var(--maxw);
  margin:9vh auto 10vh;
  padding:0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
}
.head{margin:13vh 0 14px}
.brand{margin:0 0 2px; font-size:clamp(18px, 2.2vw, 22px); font-weight:700; letter-spacing:.02em}
.tag{margin:0; color:var(--muted); font-size:12px; margin-left:0.28em; /* 光学調整：右へほんの少し寄せる */}



.brand-row{
  display:flex;
  align-items:center;
  gap:8px; /* 控えめ */
}

.logo-inline{
  width:28px; /* 気配だけの存在感 */
  height:auto;
  opacity:0.8; /* さりげなく */
  margin-bottom: 20px;
}






/* ===== Links ===== */
.links{display:grid; gap:10px; margin-top:36px}
.row{
  display:flex; align-items:center; justify-content:space-between;
  text-decoration:none; color:inherit; background:#fff;
  border:1px solid var(--line); border-radius:var(--radius);
  padding:12px 14px; line-height:2.2; min-height:44px; /* タップしやすく */
  transition: background .18s ease, border-color .18s ease, transform .14s ease;
}
.label{font-weight:700; font-size:13px}
.arrow{opacity:.45; font-size:13px}
.row:hover{background:var(--accent); border-color:#e8dccf; transform:translateY(-1px)}
.row:active{transform:translateY(0)}
.row:focus-visible{outline:2px solid #0000; box-shadow:0 0 0 2px var(--accent), 0 0 0 4px var(--line)}

/* ===== Footer ===== */
.foot{margin-top:22px; color:var(--muted); font-size:12px; text-align:center}

/* ===== Responsive ===== */

@media (max-width:480px){
  .row{ line-height:1.8;}
}



@media (max-width:360px){
  .row{padding:11px 12px}
}

@media (min-width:768px){
  :root{ --maxw:780px }
  .wrap{margin-top:10vh}
  .links{gap:12px}
  .row{padding:14px 18px}
}

@media (min-width:1200px){
  :root{ --maxw:840px }
  .row{border-radius:16px}
}

/**** Reduced motion ****/
@media (prefers-reduced-motion: reduce){
  .row{transition:none}
}

/**** Touch-friendly tweaks ****/
@media (pointer:coarse){
  .row{padding:16px 16px}
}


/* === Phone: tag を 11px に固定 === */
@media (max-width:600px){
  .head .tag{ font-size:11px !important; }
}







/* Social Icons */
.icons{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:6px 0 12px;
}
.ic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px; height:38px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--fg);
  text-decoration:none;
}
.ic:hover{
  background:var(--accent);
  border-color:#e8dccf;
  transform:translateY(-1px);
}
.icon{
  width:24px; height:24px;
  display:block;
}






/* ===== FIX PATCH (safe to append) ===== */

/* スマホで左右に余裕ある余白（safe-area対応） */
@media (max-width:600px){
  .wrap{
    padding: 0 calc(36px + env(safe-area-inset-left))
             0 calc(36px + env(safe-area-inset-right));
  }
}

/* アイコン行の整え：気配だけの小サイズ、行間のにじみ防止 */
.icons{
  gap: 8px;
  margin: 8px 0 14px;
}
.ic{
  width: 38px;    /* 38→28で繊細に */
  height: 38px;
}
.icon{
  width: 20px;    /* 24→16で輪郭だけに */
  height: 20px;
  display: block; /* ベースラインのズレ防止 */
  object-fit: contain;
}

/* もしロゴを名前の左に置くなら（未使用なら無害） */
.brand-row{
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-inline{
  width: 20px;  /* “しれっと”存在するサイズ感 */
  height: auto;
  vertical-align: middle;
  opacity: .8;
}















/* 背景エフェクト用キャンバス */
/* ===== Ever-moving melting gradients (CSS基盤) ===== */
#bgfx{
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
#bgfx::before{
  content:""; position:absolute; inset:-10%; /* 余白でズーム時の切れ防止 */

  /* 4枚の淡いラジアルを重ねる（配色＝#6d8394/#e2c6a6/#f2e6d7/#b7c1cb） */
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(109,131,148,0.58), rgba(109,131,148,0) 60%),
    radial-gradient(55% 55% at 80% 40%, rgba(226,198,166,0.58), rgba(226,198,166,0) 60%),
    radial-gradient(65% 65% at 40% 75%, rgba(242,230,215,0.50), rgba(242,230,215,0) 60%),
    radial-gradient(50% 50% at 70% 80%, rgba(183,193,203,0.50), rgba(183,193,203,0) 60%);
  background-repeat:no-repeat;
  background-blend-mode:screen,screen,screen,screen;

  /* CSSアニメ（常に動き続ける土台） */
  background-size:120% 120%,120% 120%,120% 120%,120% 120%;
  background-position:20% 30%, 80% 40%, 40% 75%, 70% 80%;
  animation:
    melt-pos 12s cubic-bezier(.45,.05,.55,.95) infinite alternate,
    melt-size 16s cubic-bezier(.45,.05,.55,.95) infinite alternate-reverse,
    hue-drift 60s linear infinite;

    filter: url("#bg-warp") hue-rotate(var(--hue, 0deg)) saturate(112%) blur(var(--blur,0px));
  -webkit-filter: url("#bg-warp") hue-rotate(var(--hue, 0deg)) saturate(112%) blur(var(--blur,0px));

  
  /* JSが触るパラメータ（CSS変数） */
  transform: translate3d(var(--tx,0px), var(--ty,0px), 0) scale(var(--scale,1.02));
  filter: hue-rotate(var(--hue, 0deg)) saturate(112%) blur(var(--blur,0px));
  will-change: transform, filter, background-position, background-size;
}

/* 前景 */
.wrap{ position:relative; z-index:1 }

/* 位置スライド */
@keyframes melt-pos{
  0%   { background-position: 18% 34%, 82% 38%, 42% 78%, 72% 80%; }
  100% { background-position: 36% 18%, 64% 56%, 30% 62%, 54% 88%; }
}
/* サイズ呼吸 */
@keyframes melt-size{
  0%   { background-size: 115% 115%, 115% 115%, 115% 115%, 115% 115%; }
  100% { background-size: 175% 175%, 145% 145%, 165% 165%, 150% 150%; }
}
/* 色相わずかに漂う */
@keyframes hue-drift{
  0%   { filter: hue-rotate(0deg)  saturate(112%); }
  50%  { filter: hue-rotate(10deg) saturate(116%); }
  100% { filter: hue-rotate(0deg)  saturate(112%); }
}

/* Reduced Motion：遅く・弱く */
@media (prefers-reduced-motion: reduce){
#bgfx{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
#bgfx::before{
  content:"";
  position:absolute;
  inset:-60%;                 /* ←オーバースキャン大きく（白チラ防止） */
  transform: translate3d(var(--tx,0px), var(--ty,0px), 0) scale(var(--scale,1.20)); /* ←少し拡大 */
  filter: hue-rotate(var(--hue,0deg)) saturate(112%) blur(var(--blur,0px));
  will-change: transform, filter, background-position, background-size;

  /* 背景は JS が “毎回ランダム” で丸ごと注入する（後述） */
  background-repeat:no-repeat;
  background-blend-mode:screen,screen,screen,screen;

  /* ベースの永続アニメ（delay を var で受ける） */
  animation:
    melt-pos  12s cubic-bezier(.45,.05,.55,.95) var(--d1,0s) infinite alternate,
    melt-size 16s cubic-bezier(.45,.05,.55,.95) var(--d2,0s) infinite alternate-reverse,
    hue-drift 60s linear                        var(--d3,0s) infinite;
}

}











/* ==== Mobile bottom safe space (確実に余白を作る) ==== */
@media (max-width:600px){
  .wrap::after{
    content:"";
    display:block;
    height: calc(14vh + env(safe-area-inset-bottom));           /* 基本 */
    height: calc(14vh + constant(safe-area-inset-bottom));      /* 旧iOS用フォールバック */
    margin-top: 6px;                                            /* 視覚の余白 少し */
  }
}

/* 新しいブラウザでは動的VPに置き換え（より確実） */
@supports (height: 1dvh){
  @media (max-width:600px){
    .wrap::after{
      height: calc(14dvh + env(safe-area-inset-bottom));
    }
  }
}
@supports (height: 1svh){
  @media (max-width:600px){
    .wrap::after{
      height: calc(14svh + env(safe-area-inset-bottom));
    }
  }
}

