/*
 * style_new.css — app_new.php 専用（style.css は変更しない）
 *
 * レイアウト:
 *   スマホ     設計幅 360px（幅または高さが 480px 以下）
 *   それ以外   設計幅 768px（幅・高さとも 481px 以上）
 * ビューポートが設計幅より広い場合は左右余白で中央寄せ
 */

/* --- 変数・ブレークポイント --- */
:root {
  --layout-w: 360px;
  --layout-pad: 16px;
  --color-text: #3f4a4f;
  --color-bg: #ffffff;
  --color-main: #f8f8f8;
  --color-header: #374142;
  --color-link: #c80000;
  --color-link-hover: #ee0000;
  --shadow-section: 0 1px 12px rgba(200, 200, 200, 0.1);
  --icon-size: 60px;
  --icon-radius: 14px;
  --title-size: 1.6rem;
  --summary-size: 1.2rem;
  --headline-pad: 16px 0;
  --headline-size: 2rem;
  --badge-left: 8px;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  :root {
    --layout-w: 768px;
    --layout-pad: 24px;
    --icon-size: 104px;
    --icon-radius: 20px;
    --title-size: 2.4rem;
    --summary-size: 1.6rem;
    --headline-pad: 32px 0;
    --headline-size: 2.6rem;
    --badge-left: 32px;
  }
}

/* --- リセット（最小） --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
input,
textarea,
p,
blockquote,
th,
td {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

img,
iframe {
  vertical-align: bottom;
  max-width: 100%;
}

html {
  font-size: 62.5%;
}

body {
  font-family: "メイリオ", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Meiryo,
    "ＭＳ Ｐゴシック", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1.4rem;
  overflow-x: hidden;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  body {
    font-size: 1.6rem;
  }
}

main {
  display: block;
  background: var(--color-main);
}

p {
  line-height: 1.4;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  p {
    line-height: 1.6;
  }
}

a {
  color: var(--color-link);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: none;
}

a:active {
  position: relative;
  top: 2px;
}

/* 中央カラム（設計幅固定） */
.layout-column {
  width: min(100%, var(--layout-w));
  max-width: var(--layout-w);
  margin-inline: auto;
}

/* --- カテゴリ色 --- */
.color_new {
  background: linear-gradient(135deg, #fedf00 0%, #ff9500 100%);
}
.color_learn {
  background: linear-gradient(135deg, #b1ea4d 0%, #3da60b 100%);
}
.color_assist {
  background: linear-gradient(135deg, #ffffc7 0%, #00b7ff 50%, #5578ea 100%);
}
.color_game {
  background: linear-gradient(135deg, #ff1800 0%, #a90011 100%);
}
.color_kids {
  background: linear-gradient(135deg, #fecf00 0%, #ff4f13 100%);
}
.color_portrait {
  background: linear-gradient(135deg, #fdfd04 0%, #ff1ec9 100%);
}
.color_tool {
  background: linear-gradient(135deg, #0feeb4 0%, #0372d8 100%);
}
.color_interactive {
  background: linear-gradient(135deg, #f02fc2 0%, #6094ea 100%);
}

/* --- ヘッダー --- */
header {
  background: var(--color-header);
}

.header_area {
  width: min(100%, var(--layout-w));
  max-width: var(--layout-w);
  height: 48px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1.logo a {
  display: block;
  width: 120px;
  height: 48px;
  margin: 0 0 0 var(--layout-pad);
  background: url(../image/logo.svg) center / 120px no-repeat;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
}

h1.logoja a {
  display: block;
  width: 200px;
  height: 48px;
  margin: 0 0 0 var(--layout-pad);
  background: url(../image/logo_japlus.svg) center / 200px no-repeat;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  h1.logo a {
    width: 160px;
    background-size: 160px;
  }
  h1.logoja a {
    width: 269px;
    background-size: 269px;
  }
}

ul.language {
  display: flex;
}

ul.language li {
  flex-grow: 1;
}

ul.language li a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 48px;
  padding: 0 4px;
  font-size: 0.9rem;
  line-height: 1;
  color: #fff;
  background: #3f4a4f;
  text-align: center;
  text-decoration: none;
  word-break: keep-all;
  transition: color 0.2s;
  z-index: 0;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  ul.language li a {
    width: 120px;
    font-size: 1.2rem;
  }
}

ul.language li br {
  display: none;
}

ul.language li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(0deg, #dd0000 0%, #c80000 100%);
  z-index: -1;
  transition: height 0.2s;
}

ul.language li a:hover::after,
ul.language li a:active::after {
  height: 100%;
}

ul.language li a:hover {
  color: #fff;
}

ul.language li.active a,
ul.language li.active a:active {
  color: var(--color-text);
  font-weight: bold;
  background: #fff;
}

ul.language li.active a::after {
  background: #fff;
  height: 100%;
}

/* ナビ帯はブラウザ幅いっぱい（コンテンツ列の --layout-w 制限はかけない） */
nav {
  width: 100%;
  background: var(--color-main);
}

ul.menu {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--color-main);
  border-bottom: 1px solid #fff;
  display: flex;
  justify-content: stretch;
}

ul.menu li {
  flex: 1 1 0;
}

ul.menu li a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  color: var(--color-text);
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.2s;
  z-index: 0;
}

ul.menu li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(0deg, #ee0000 0%, #c80000 100%);
  z-index: -1;
  transition: height 0.2s;
}

ul.menu li a:hover::after,
ul.menu li a:active::after {
  height: 6px;
}

ul.menu li a:hover {
  color: var(--color-link);
}

ul.menu li.active a,
ul.menu li.active a:active {
  color: var(--color-text);
  font-weight: bold;
}

ul.menu li.active a::after {
  background: #3f4a4f;
  height: 6px;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  ul.menu {
    justify-content: center;
  }
  ul.menu li {
    flex: 0 0 auto;
  }
  ul.menu li a {
    width: 160px;
  }
}

/* --- アプリ一覧（main.list_link） --- */
.list_link {
  padding-bottom: 8px;
}

.list_link a {
  color: var(--color-text);
  text-decoration: none;
  display: block;
  /* タップ範囲を .list と同じ設計幅に（ブラウザ全幅にしない） */
  width: min(100%, var(--layout-w));
  max-width: var(--layout-w);
  margin-inline: auto;
}

.list_link a:hover .section {
  background: linear-gradient(0deg, #fff 0%, #ff0 50%, #fff 100%);
}

.section {
  width: min(100%, var(--layout-w));
  max-width: var(--layout-w);
  margin: 0 auto 4px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow-section);
}

.list_link a .section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  .section {
    margin-bottom: 8px;
  }
  .list_link a .section {
    margin-bottom: 8px;
  }
}

.container {
  width: 100%;
  padding: 0;
  margin: 0;
}

.list {
  width: 100%;
  padding: 16px var(--layout-pad);
  margin: 0;
  background-image: url(../image/list_arrow.svg);
  background-repeat: no-repeat;
  background-position: right var(--layout-pad) center;
  background-size: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  .list {
    padding: 16px calc(var(--layout-pad) + 20px) 16px var(--layout-pad);
    background-position: right var(--layout-pad) center;
  }
}

.appli_icon {
  flex: 0 0 auto;
  margin: 0 16px 0 0;
  display: flex;
  align-items: center;
}

.appli_icon img {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: var(--icon-radius);
  border: 1px solid #eaeaea;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.list_read {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 24px 0 0;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  .list_read {
    margin-right: 48px;
  }
}

.list_read h3.list_title {
  font-size: var(--title-size);
  line-height: 1.2;
  margin: 0;
}

.list_read h3.list_title span {
  font-size: 1.4rem;
  margin-right: 4px;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  .list_read h3.list_title span {
    font-size: 2.4rem;
  }
}

.list_read p {
  font-size: var(--summary-size);
  margin: 4px 0 0;
  line-height: 1.2;
}

.list_read br {
  display: inline;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  .list_read br {
    display: none;
  }
}

h2.headline_title {
  width: 100%;
  max-width: none;
  margin: 0 0 4px;
  padding: var(--headline-pad);
  font-size: var(--headline-size);
  line-height: 1.2;
  color: #fff;
  text-align: center;
  word-break: keep-all;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  h2.headline_title {
    margin-bottom: 8px;
  }
  h2.headline_title br {
    display: none;
  }
}

h4.sub_category {
  width: 100%;
  max-width: none;
  margin: 0 0 4px;
  padding: 8px 0;
  font-size: 1.6rem;
  text-align: center;
  color: #fff;
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  h4.sub_category {
    margin-bottom: 8px;
    font-size: 2.2rem;
  }
}

p.new {
  width: 32px;
  font-size: 1rem;
  padding: 2px 0 0;
  margin: 0 0 -16px;
  background: linear-gradient(135deg, #fedf00 0%, #ff9500 100%);
  color: #fff;
  text-align: center;
  border-radius: 2px;
  position: relative;
  top: 8px;
  left: var(--badge-left);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  p.new {
    width: 48px;
    font-size: 1.4rem;
    margin-bottom: -24px;
    border-radius: 4px;
    top: 4px;
  }
}

p.new span {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* --- フッター --- */
footer {
  width: 100%;
}

.footer_menu {
  background: var(--color-main);
}

.footer_sns {
  background: #3f4a4f;
}

.footer_store_botton {
  background: var(--color-header);
}

footer ul {
  width: min(100%, var(--layout-w));
  max-width: var(--layout-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

footer ul li {
  flex-grow: 1;
  box-sizing: border-box;
}

footer ul li img {
  width: 48px;
  margin: 8px 0;
}

.footer_menu ul {
  flex-direction: column;
}

.footer_menu ul li {
  width: 100%;
  word-break: keep-all;
}

.footer_menu ul li a {
  position: relative;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 var(--layout-pad);
  border-bottom: 2px solid #fff;
  color: var(--color-text);
  font-size: 1.2rem;
  text-decoration: none;
}

.footer_menu ul li a:hover {
  color: var(--color-link);
}

.footer_menu ul li a::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 0;
  border-top: 2px solid var(--color-text);
  border-right: 2px solid var(--color-text);
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  right: 5%;
  margin-top: -6px;
}

.footer_menu ul li a:hover::before {
  border-color: var(--color-link);
}

@media screen and (min-width: 481px) and (min-height: 481px) {
  .footer_menu ul {
    flex-direction: row;
  }
  .footer_menu ul li {
    width: 12.5%;
  }
  .footer_menu ul li a {
    justify-content: center;
    height: 58px;
    padding: 0;
    border-bottom: none;
  }
  .footer_menu ul li a::before {
    display: none;
  }
  .footer_menu ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(0deg, #ee0000 0%, #c80000 100%);
    z-index: -1;
    transition: height 0.2s;
  }
  .footer_menu ul li a:hover::after {
    height: 4px;
  }
}

.copyright {
  height: 160px;
  color: var(--color-main);
  background: var(--color-header);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.copyright img {
  width: 40px;
  margin: 16px 0 20px;
}

.copyright p {
  margin: 0 0 16px;
}

.copyright_link a {
  color: var(--color-main);
  font-size: 1.2rem;
}

.copyright_link a:hover {
  color: #fff;
}
