/* PC 幅(960px 以上)のレイアウト。スマホの見た目は mobile.css のまま変えない */
@media(min-width:960px){
  html,body{background:var(--mint)}
  html:has(body[data-phase="result"]),body[data-phase="result"]{background:#f5e9af}
  .phone-app{max-width:none;min-height:100svh;margin:0;border-radius:0;box-shadow:none;display:flex;flex-direction:column}
  main{flex:1}
  body[data-phase="choose"] main{display:grid;align-items:center}
  .site-header{padding:14px max(40px,calc((100vw - 1120px)/2))}
  body[data-phase="choose"] .play-mobile{
    --focus-h:clamp(330px,calc(100svh - 326px),460px);--focus-w:calc(var(--focus-h)*.8);
    --hand-w:clamp(140px,14vw,192px);--hand-h:calc(var(--hand-w)*1.25);
    box-sizing:border-box;width:100%;max-width:1200px;margin:auto;padding:20px 40px;
    display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:clamp(40px,7vw,104px);
    grid-template-rows:auto 1fr auto auto 1fr;
    grid-template-areas:"theme progress" "focus ." "focus title" "focus hand" "focus controls"
  }
  body[data-phase="choose"] .theme-strip{grid-area:theme;max-width:var(--focus-w)}
  body[data-phase="choose"] .theme-strip>span{font-size:12px}
  body[data-phase="choose"] .theme-strip p{font-size:16px;font-weight:700}
  body[data-phase="choose"] .mobile-progress{grid-area:progress;margin:0;justify-content:space-between}
  body[data-phase="choose"] .mobile-progress li{width:32px;height:34px}
  body[data-phase="choose"] .mobile-progress ol{gap:8px}
  body[data-phase="choose"] .focus-zone{grid-area:focus;align-self:center;margin:20px 0 0;padding-top:46px;justify-content:flex-start}
  body[data-phase="choose"] .release-target{left:calc(var(--focus-w)/2)}
  body[data-phase="choose"] .focus-tools{width:var(--focus-w);right:auto}
  body[data-phase="choose"] .card-origin,body[data-phase="choose"] .incoming-return{font-size:14px}
  body[data-phase="choose"] .focus-tip{font-size:12px}
  body[data-phase="choose"] .focus-card{padding:28px;border-width:2px;border-radius:16px;box-shadow:6px 7px 0 var(--ink);cursor:grab}
  body[data-phase="choose"] .focus-card .paper-top{font-size:14px}
  body[data-phase="choose"] .focus-card .paper-word{font-size:48px;margin:44px 0 16px}
  body[data-phase="choose"] .focus-card .paper-word.long{font-size:34px}
  body[data-phase="choose"] .focus-card .paper-meaning{font-size:19px}
  body[data-phase="choose"] .focus-card .paper-foot{font-size:11px}
  body[data-phase="choose"] .play-title{grid-area:title;text-align:left;margin:0}
  body[data-phase="choose"] .play-title h1{font-size:32px}
  body[data-phase="choose"] .play-title p{font-size:16px}
  body[data-phase="choose"] .hand-zone{grid-area:hand;margin-top:28px}
  body[data-phase="choose"] .hand-label{font-size:14px;justify-content:flex-start;gap:16px}
  body[data-phase="choose"] .hand-fan{display:flex;gap:20px;height:auto;margin:14px 0 0}
  body[data-phase="choose"] .hand-card{position:relative;left:auto;top:auto;padding:16px;transform:none}
  body[data-phase="choose"] .hand-card .paper-top{font-size:11px}
  body[data-phase="choose"] .hand-card .paper-word{font-size:27px;margin:34px 0 12px}
  body[data-phase="choose"] .hand-card .paper-word.long{font-size:19px}
  body[data-phase="choose"] .play-controls{grid-area:controls;align-self:start;margin-top:28px;grid-template-columns:minmax(0,360px) auto;gap:24px}
  body[data-phase="choose"] .discard-button{font-size:17px;min-height:58px}
  body[data-phase="choose"] .undo-button{font-size:15px}
}
@media(min-width:960px) and (hover:hover){
  body[data-phase="choose"] .hand-card:not(.dragging):hover{transform:translateY(-6px)}
}
@media(min-width:960px) and (max-height:760px){
  body[data-phase="choose"] .focus-card .paper-word{font-size:38px;margin:26px 0 12px}
  body[data-phase="choose"] .focus-card .paper-word.long{font-size:29px}
  body[data-phase="choose"] .focus-card .paper-meaning{font-size:16px}
  body[data-phase="choose"] .hand-zone,body[data-phase="choose"] .play-controls{margin-top:18px}
}

/* 最初の画面 */
@media(min-width:960px){
  .welcome-mobile{max-width:1200px;margin:auto;padding:48px 40px 56px;display:grid;grid-template-columns:440px minmax(0,1fr);column-gap:64px;align-content:center;min-height:min(620px,calc(100svh - 130px))}
  .welcome-mobile>*{grid-column:1}
  .welcome-mobile .mobile-heading h1{font-size:44px;line-height:1.4;white-space:nowrap}
  .welcome-mobile .mobile-heading p{font-size:18px}
  .welcome-mobile form{margin-top:28px}
  .welcome-mobile .welcome-note{text-align:left}
  .welcome-mobile .welcome-fan{grid-column:2;grid-row:1/span 6;align-self:center;height:440px;margin:0}
  .welcome-fan img{width:clamp(160px,17vw,250px);border-width:2px;border-radius:16px;box-shadow:6px 7px 0 var(--ink);top:56px}
  .welcome-fan img:nth-child(1){transform:translateX(calc(-50% - clamp(72px,72px + (100vw - 960px)*.12,130px))) rotate(-13deg)}
  .welcome-fan img:nth-child(2){top:30px}
  .welcome-fan img:nth-child(3){transform:translateX(calc(-50% + clamp(72px,72px + (100vw - 960px)*.12,130px))) rotate(13deg)}
  .welcome-howto{padding:64px max(40px,calc((100vw - 1120px)/2))}
  .welcome-howto header h2{font-size:36px}
  .welcome-howto header h2 br{display:none}
  .welcome-howto header>p{font-size:16px}
  .howto-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:28px;margin-top:36px}
  .howto-steps>li,.howto-steps>li:first-child{display:block;padding:0;border:0}
  .howto-visual img{max-width:150px}
  .howto-copy h3{margin-top:16px;font-size:17px}
  .howto-copy p{font-size:15px;line-height:1.8}
  .howto-footer{margin-top:40px;font-size:16px}
}
/* 見直し */
@media(min-width:960px){
  .review-mobile{max-width:1200px;margin:auto;padding:36px 40px 0}
  .review-mobile .mobile-heading h1{font-size:36px}
  .review-mobile .mobile-heading p br{display:none}
  .review-status{display:flex;align-items:baseline;gap:24px;margin:20px 0}
  .mobile-review-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
  .review-card{min-height:210px;padding:18px}
  .review-card strong{font-size:clamp(17px,1.8vw,24px)}
  .review-bottom{grid-template-columns:360px auto;justify-content:center;align-items:center;gap:28px;padding:16px 0;margin-top:28px}
}
@media(min-width:960px) and (hover:hover){.review-card:not(.picked):hover{background:#fff8d0}}
/* 結果 */
@media(min-width:960px){
  .result-mobile{max-width:1200px;margin:auto;padding:36px 40px 56px}
  .result-mobile .mobile-heading h1{font-size:34px}
  .result-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center;margin-top:12px}
  .result-stage{--result-card-width:clamp(280px,calc((100svh - 330px)*.72),360px)}
  .result-pager{margin-top:0}
  .mobile-question{margin-top:0;padding:24px 0}
  .mobile-question>span{font-size:15px}
  .mobile-question p{font-size:26px}
  .result-dots button{font-size:15px;min-height:48px}
  .result-mobile .share-panel{padding:32px 36px;margin-top:44px}
  .result-mobile .share-panel h2{font-size:28px}
  .social-buttons{grid-template-columns:repeat(4,1fr)}
  .save-text{display:block;width:360px;margin:28px auto 0}
  .end-actions{justify-content:center;gap:40px}
  .end-actions button{font-size:15px}
  #share-dialog{max-width:820px;padding:32px}
  .share-previews{grid-template-columns:repeat(4,minmax(0,1fr))}
  .share-file-actions,.share-post-actions{flex-direction:row}
  .share-file-actions>*,.share-post-actions>*{width:auto;flex:1}
  #help-dialog{max-width:1080px;padding:36px 44px}
  #help-dialog h2{font-size:32px}
  #help-dialog h2 br{display:none}
  #help-dialog>.help-lead{font-size:16px}
  #help-dialog .howto-steps{gap:24px;margin-top:28px}
  #help-dialog .howto-footer{margin:28px 0}
  #help-dialog .close-help{display:block;width:320px;margin:auto}
}
