/* v1.0.12 mobile layout polish - existing CSS direct */
html,
body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overscroll-behavior-x:none!important;
}
body{
  position:relative!important;
  touch-action:pan-y!important;
  background:#eefbfb!important;
}
button,
a,
summary,
select,
label.check,
[role="button"],
[onclick],
[data-news-id],
[data-thanks-id],
[data-edit-id],
[data-delete-id],
[data-notice-id],
[data-reason],
.submit,
.soft-button,
.icon-button,
.back,
.edit-icon,
.statement-edit-icon,
.notice-confirm,
.activity-edit-btn,
.activity-delete-btn,
.dept-member-thanks,
.mori-tree-node,
.dept-node,
.tree-card-close,
.thanks-confirm-button,
.nav a,
.big-action a,
.auth-button,
.pill-button,
.pill-soft{
  cursor:pointer!important;
}
button:disabled,
[disabled],
[aria-disabled="true"],
.dept-member-thanks:disabled{
  cursor:not-allowed!important;
}
.auth-logout{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:132px!important;
  width:auto!important;
  padding:0 24px!important;
  white-space:nowrap!important;
}
.app{
  width:min(100%,430px)!important;
  max-width:430px!important;
  overflow-x:hidden!important;
  padding-bottom:94px!important;
}
.app::after{
  content:none!important;
  display:none!important;
  height:0!important;
}
.top,
.card,
.form,
.complete,
.letter,
.profile-card,
.tree-stage,
.challenge-card,
.big-action,
.intro,
.mori-visual,
.news-list,
.stats-grid{
  max-width:calc(100% - 32px)!important;
}
.top{
  max-width:430px!important;
  width:100%!important;
  margin:0 auto!important;
}
.top .brand,
.top .page-title{
  min-width:0!important;
}
.top .brand span,
.top .page-title{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.sky,
.home-hero{
  max-width:calc(100% - 32px)!important;
}
.home-hero h1{
  font-size:35px!important;
  line-height:1.12!important;
}
.home-hero .cloud,
.home-hero .petal,
.home-hero .rin-img{
  max-width:100%!important;
}
.hero-challenge{
  width:100%!important;
  max-width:330px!important;
  margin:18px auto 0!important;
  padding:12px 14px!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.72)!important;
  box-shadow:inset 0 0 0 1px rgba(93,130,105,.10)!important;
  text-align:center!important;
}
.hero-challenge span{
  display:block!important;
  margin-bottom:4px!important;
  color:#607569!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.25!important;
  text-align:center!important;
}
.hero-challenge strong{
  display:block!important;
  color:#244038!important;
  font-size:18px!important;
  font-weight:900!important;
  line-height:1.45!important;
  text-align:center!important;
}
.primary-record-action a,
.big-action a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  text-align:center!important;
}
.primary-record-action a span,
.big-action a span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:28px!important;
  flex:0 0 28px!important;
  margin:0!important;
}
.primary-record-action a strong,
.big-action a strong{
  display:inline-block!important;
  margin:0!important;
  transform:translateX(-6px)!important;
}
.rinchan-sync-status,
.rinchan-queue-status{
  width:calc(100% - 32px)!important;
  max-width:398px!important;
  margin:0 auto 10px!important;
  min-height:28px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  color:#7a8f82!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1.25!important;
  text-align:center!important;
  opacity:.88!important;
}
.rinchan-sync-status{
  flex-direction:column!important;
  gap:2px!important;
}
.rinchan-sync-status span::before{
  content:'●'!important;
  display:inline-block!important;
  margin-right:5px!important;
  color:#69c47d!important;
  font-size:8px!important;
  vertical-align:1px!important;
}
.rinchan-sync-status.is-syncing span::before{
  color:#28b8d2!important;
}
.rinchan-sync-status.is-error span::before{
  color:#d24c7d!important;
}
.rinchan-sync-status small{
  display:block!important;
  color:#d24c7d!important;
  font-size:10px!important;
  font-weight:850!important;
}
.rinchan-queue-status{
  min-height:34px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:#fff7df!important;
  color:#8a6a1f!important;
  box-shadow:inset 0 0 0 1px rgba(210,161,45,.22)!important;
}
.rinchan-queue-status span::before{
  content:'⚠️'!important;
  margin-right:4px!important;
}
.rinchan-queue-status button{
  border:0!important;
  border-radius:999px!important;
  padding:5px 10px!important;
  background:#8a6a1f!important;
  color:white!important;
  font-size:11px!important;
  font-weight:900!important;
}
.nav{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:min(430px,100vw)!important;
}

/* v1.0.12 direct layout polish */
.steps-summary strong{
  display:inline-flex!important;
  align-items:baseline!important;
  justify-content:flex-start!important;
  margin-right:8px!important;
  line-height:1!important;
  vertical-align:baseline!important;
}
.steps-summary>span{
  display:inline-flex!important;
  align-items:baseline!important;
  justify-content:flex-start!important;
  position:static!important;
  float:none!important;
  margin:0!important;
  transform:none!important;
  line-height:1!important;
  vertical-align:baseline!important;
  font-size:20px!important;
  font-weight:900!important;
}
.steps-summary small,
.steps-goal,
.steps-trend{
  clear:both!important;
  display:block!important;
}
.tree-stage h2,
.tree-stage #treeTitle{
  text-align:center!important;
  line-height:1.35!important;
  word-break:keep-all!important;
  text-wrap:balance!important;
}
.tree-stage #treeText{
  max-width:18em!important;
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
  line-height:1.75!important;
  word-break:keep-all!important;
  text-wrap:balance!important;
}
.tree-stage .growth-note,
.tree-stage #growthNote{
  max-width:19em!important;
  margin:14px auto 0!important;
  text-align:center!important;
  line-height:1.6!important;
  word-break:keep-all!important;
  text-wrap:balance!important;
}
.news-page .news-hero{
  width:calc(100% - 40px)!important;
  max-width:390px!important;
  margin:20px auto 18px!important;
  padding:34px 20px 36px!important;
  border-radius:34px!important;
  background:linear-gradient(180deg,#dcf8ff 0%,#f5fff9 56%,#e8ffd9 100%)!important;
  text-align:center!important;
  box-shadow:none!important;
}
.news-page .news-hero h1{
  font-size:30px!important;
  line-height:1.25!important;
  text-align:center!important;
}
.news-page .news-hero p{
  max-width:15.5em!important;
  margin:12px auto 0!important;
  font-size:15px!important;
  line-height:1.75!important;
  text-align:center!important;
  word-break:keep-all!important;
  text-wrap:balance!important;
  overflow:visible!important;
  white-space:normal!important;
}
.news-page .news-summary-card .section-head-row{
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
}
.news-page .news-summary-card .summary-pill{
  margin-left:auto!important;
  flex:0 0 auto!important;
}
.thanks-inline-list{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
  margin-top:14px!important;
}
.thanks-inline-heading{
  margin:2px 0 0!important;
}
.thanks-compact-item,
.thanks-story-item{
  display:block!important;
  width:100%!important;
  box-sizing:border-box!important;
  padding:16px!important;
  border-radius:22px!important;
  background:#fff!important;
  border:1px solid rgba(93,130,105,.14)!important;
  box-shadow:0 8px 18px rgba(60,120,90,.06)!important;
}
.thanks-compact-item+.thanks-compact-item{
  margin-top:0!important;
}
.thanks-compact-item .thanks-story-top{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:8px!important;
}
.thanks-compact-item p{
  margin:0 0 10px!important;
  color:#607569!important;
  font-size:14px!important;
  line-height:1.65!important;
}
.forest-progress-note,
#moriStatusProgressNote{
  text-align:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
  max-width:22em!important;
  line-height:1.6!important;
  word-break:keep-all!important;
  text-wrap:balance!important;
}
.mori-visual.dashboard-hero{
  width:calc(100% - 40px)!important;
  max-width:390px!important;
  margin:20px auto!important;
  padding:18px 14px 24px!important;
  border-radius:34px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.mori-note{
  text-align:right!important;
  margin:0 2px 12px!important;
  font-size:12px!important;
}
.mori-game-map{
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:12px!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:start!important;
  justify-items:center!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border-radius:28px!important;
  background:linear-gradient(180deg,#dff7ff,#e9ffd6)!important;
}
.mori-tree-node.dept-node{
  position:static!important;
  width:100%!important;
  max-width:96px!important;
  min-width:0!important;
  min-height:96px!important;
  height:auto!important;
  margin:0 auto!important;
  padding:9px 4px 8px!important;
  transform:none!important;
  box-sizing:border-box!important;
}
.mori-tree-node.dept-node span{
  font-size:24px!important;
  line-height:1!important;
}
.mori-tree-node.dept-node strong{
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  min-height:28px!important;
  font-size:10.5px!important;
  line-height:1.2!important;
  word-break:keep-all!important;
  overflow-wrap:anywhere!important;
}
.mori-tree-node.dept-node em{
  min-height:22px!important;
  font-size:10.5px!important;
  padding:1px 8px!important;
}
@media(max-width:360px){
  .home-hero h1{
    font-size:30px!important;
  }
  .auth-logout{
    min-width:124px!important;
    padding:0 20px!important;
  }
  .rinchan-sync-status,
  .rinchan-queue-status{
    font-size:10px!important;
  }
  .mori-game-map{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .mori-tree-node.dept-node{max-width:108px!important;}
}
