@import url('/css/public-auth-bridge.css');

.towachi-presence{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9998;
  display:grid;
  grid-template-columns:74px auto;
  align-items:end;
  gap:10px;
  pointer-events:none;
  filter:drop-shadow(0 8px 18px rgba(0,0,0,.22));
}
.towachi-presence__art{
  width:74px;
  height:98px;
  object-fit:cover;
  object-position:center 24%;
  border:2px solid #151216;
  border-radius:16px 16px 10px 10px;
  background:#fff;
  box-shadow:4px 4px 0 #151216;
  transform:rotate(-3deg);
  pointer-events:auto;
}
.towachi-presence__bubble{
  max-width:250px;
  margin-bottom:9px;
  padding:10px 12px;
  border:2px solid #151216;
  border-radius:16px 16px 16px 4px;
  background:#fff;
  color:#151216;
  box-shadow:4px 4px 0 #151216;
  pointer-events:auto;
  font-family:Inter,"Noto Sans JP",system-ui,sans-serif;
}
.towachi-presence__eyebrow{
  display:block;
  color:#a55a8c;
  font-size:9px;
  font-weight:1000;
  letter-spacing:.13em;
  margin-bottom:3px;
}
.towachi-presence__bubble strong{
  display:block;
  font-size:13px;
  line-height:1.25;
}
.towachi-presence__bubble p{
  margin:4px 0 7px;
  font-size:10px;
  line-height:1.45;
  font-weight:700;
  color:#645c66;
}
.towachi-presence__links{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.towachi-presence__links a{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 8px;
  border:1.5px solid #151216;
  border-radius:999px;
  background:#ffb5d7;
  color:#151216!important;
  text-decoration:none!important;
  font-size:9px;
  font-weight:1000;
}
.towachi-presence__links a:nth-child(2){background:#baf0df}
.towachi-presence__links a:nth-child(3){background:#ddd0ff}
.towachi-presence__close{
  position:absolute;
  right:-5px;
  top:-6px;
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  padding:0;
  border:2px solid #151216;
  border-radius:50%;
  background:#fff;
  color:#151216;
  font:1000 13px/1 system-ui;
  cursor:pointer;
  pointer-events:auto;
  box-shadow:2px 2px 0 #151216;
}
.towachi-presence.is-mini{
  grid-template-columns:58px;
}
.towachi-presence.is-mini .towachi-presence__art{
  width:58px;height:74px;cursor:pointer;
}
.towachi-presence.is-mini .towachi-presence__bubble,
.towachi-presence.is-mini .towachi-presence__close{display:none}
@media(max-width:700px){
  /* 本文を隠さないよう、スマホでは初期表示をかなりコンパクトにする。 */
  .towachi-presence{
    right:10px;
    bottom:10px;
    grid-template-columns:46px auto;
    gap:6px;
    max-width:calc(100vw - 20px);
  }

  .towachi-presence__art{
    width:46px;
    height:60px;
    border-radius:11px;
    box-shadow:3px 3px 0 #151216;
  }

  .towachi-presence__bubble{
    max-width:min(210px, calc(100vw - 82px));
    margin-bottom:4px;
    padding:7px 8px;
    border-radius:13px 13px 13px 4px;
    box-shadow:3px 3px 0 #151216;
  }

  .towachi-presence__eyebrow{
    font-size:7px;
    line-height:1.25;
    letter-spacing:.1em;
  }

  .towachi-presence__bubble strong{
    font-size:11px;
    line-height:1.2;
  }

  .towachi-presence__bubble p{display:none}

  .towachi-presence__links{
    margin-top:5px;
    gap:4px;
  }

  .towachi-presence__links a{
    min-height:21px;
    padding:0 6px;
    font-size:7px;
  }

  .towachi-presence__close{
    right:-4px;
    top:-5px;
    width:22px;
    height:22px;
    font-size:11px;
  }
}

@media(max-width:430px){
  /* 狭いiPhone幅では、キャラクターカードを右下の小さな入口として扱う。 */
  .towachi-presence{
    grid-template-columns:42px auto;
  }

  .towachi-presence__art{
    width:42px;
    height:54px;
  }

  .towachi-presence__bubble{
    max-width:184px;
  }

  .towachi-presence__links a:nth-child(3){
    display:none;
  }
}

/* Towachi PR: pr-towachi.html used --purple for the Hub card without defining it. */
.hub-card{--purple:#7d3db8}

/* Brand page: keep anchor targets clear of the sticky header. */
.site-header ~ main section[id]{scroll-margin-top:84px}

/* Brand portal: login is a global utility action, not a second Work Log-style direct entry card. */
.quick-grid > .quick-link[href="/login.html"]{display:none}

/* Brand page mobile hero: do not drop routes 03/04 when Creator CMS (05) exists. */
@media(max-width:480px){
  .site-header ~ main .hero-visual{min-height:535px}
  .site-header ~ main .hero-portrait{bottom:184px}
  .site-header ~ main .hero-extra{bottom:162px}
  .site-header ~ main .hero-map{grid-template-columns:1fr 1fr}
  .site-header ~ main .hero-map a:nth-child(3),
  .site-header ~ main .hero-map a:nth-child(4){display:grid}
  .site-header ~ main .hero-map a:nth-child(5){grid-column:1/-1}
  .site-header ~ main .hero-map strong{font-size:11px}
}
