:root {
  --color-page: #fefdfb;
  --color-ink: #111318;
  --color-muted: #191b1f;
  --color-line: #1f2529;
  --color-gold: #f0bf4b;
  --color-focus: #1f6feb;
  --color-money: #3f8d58;
  --color-life: #e0a733;
  --color-fun: #e55646;
  --color-calc: #3f6f9e;
  --header-height: 46px;
  --tab-bar-height: 58px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-page);
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--color-ink);
  background: var(--color-page);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.phone-page {
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--color-page);
}

.site-header {
  position: relative;
  z-index: 2;
  height: var(--header-height);
}

.site-logo {
  position: absolute;
  left: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  color: var(--color-ink);
  font-family: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.menu-button {
  position: absolute;
  top: 2px;
  right: 7px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--color-ink);
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.site-logo:focus-visible,
.menu-button:focus-visible,
.featured-banner-slot:focus-visible,
.category-card:focus-visible,
.recommended-item:focus-visible,
.more-tools-link:focus-visible,
.tab-item:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.page-stage {
  min-height: calc(100svh - var(--header-height));
  padding-bottom: calc(var(--tab-bar-height) + env(safe-area-inset-bottom) + 8px);
}

.image-slot {
  display: block;
}

.hero-image-section {
  padding: 2px 0 0;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.featured-image-section {
  padding: 16px 17px 0;
}

.featured-banner-slot {
  width: 100%;
  aspect-ratio: 776 / 292;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
}

.category-section {
  padding: 22px 17px 30px;
}

.category-section h2 {
  margin: 0 0 14px;
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 8px;
}

.category-card {
  position: relative;
  min-width: 0;
  height: 58px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  color: var(--category-color);
  border: 1px solid var(--category-color);
  border-radius: 8px;
  background: linear-gradient(105deg, var(--category-bg), #fffefb 72%);
  text-decoration: none;
  overflow: hidden;
}

.category-card--money {
  --category-color: var(--color-money);
  --category-bg: rgb(63 141 88 / .09);
  --category-icon-bg: rgb(63 141 88 / .08);
  --category-icon-border: rgb(63 141 88 / .16);
}

.category-card--life {
  --category-color: var(--color-life);
  --category-bg: rgb(224 167 51 / .09);
  --category-icon-bg: rgb(224 167 51 / .08);
  --category-icon-border: rgb(224 167 51 / .16);
}


.category-card--fun {
  --category-color: var(--color-fun);
  --category-bg: rgb(229 86 70 / .08);
  --category-icon-bg: rgb(229 86 70 / .07);
  --category-icon-border: rgb(229 86 70 / .14);
}

.category-card--calc {
  --category-color: var(--color-calc);
  --category-bg: rgb(63 111 158 / .08);
  --category-icon-bg: rgb(63 111 158 / .07);
  --category-icon-border: rgb(63 111 158 / .14);
}

.category-icon-slot {
  width: 0;
  height: 0;
  justify-self: center;
}

.category-label {
  min-width: 0;
  display: inline-block;
  justify-self: start;
  color: var(--category-color);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  transform: none;
  transform-origin: left center;
}

.category-arrow {
  width: 10px;
  height: 10px;
  position: absolute;
  right: 10px;
  border-top: 2px solid #a3a8ad;
  border-right: 2px solid #a3a8ad;
  transform: rotate(45deg);
}

.recommended-section {
  padding: 0 17px 36px;
}

.recommended-panel {
  overflow: hidden;
  border: 1px solid #d8dde0;
  border-radius: 8px;
  background: #fffefb;
  box-shadow: 0 3px 14px rgb(31 37 41 / .10);
}

.recommended-heading {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  border-bottom: 1px solid #dcdfe2;
  color: var(--color-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.recommended-heading-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
}

.recommended-list {
  display: grid;
}

.recommended-item {
  min-width: 0;
  height: 56px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 27px;
  align-items: center;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 1px solid #dcdfe2;
}

.tool-icon-slot {
  width: 36px;
  height: 36px;
  justify-self: center;
  border-radius: 50%;
}

.tool-icon-slot--green {
  background: rgb(92 188 114 / .65);
}

.tool-icon-slot--yellow {
  background: rgb(250 208 92 / .72);
}

.tool-icon-slot--pink {
  background: rgb(241 139 130 / .68);
}

.recommended-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.recommended-name,
.recommended-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommended-name {
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.recommended-desc {
  color: #20242a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.list-arrow {
  width: 10px;
  height: 10px;
  justify-self: center;
  position: relative;
  right: 3px;
  border-top: 2px solid #a3a8ad;
  border-right: 2px solid #a3a8ad;
  transform: rotate(45deg);
}

.more-tools-link {
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  color: #0b376d;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.more-tools-arrow {
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
  width: min(100%, 430px);
  height: calc(var(--tab-bar-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--color-page);
  border-top: 1px solid #e6e9ed;
  box-shadow: 0 -2px 10px rgb(31 37 41 / .05);
}

.tab-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #9097a0;
  text-decoration: none;
}

.tab-item[aria-current="page"] {
  color: var(--color-ink);
}

.tab-icon-slot {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #e7eaee;
}

.tab-item[aria-current="page"] .tab-icon-slot {
  background: #cfd5dc;
}

.tab-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.wip {
  position: relative;
}

.wip-veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: rgba(254, 253, 251, 0.66);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.wip-note {
  width: 100%;
  max-width: 320px;
  text-align: center;
  background: #fffefb;
  border: 1px solid #e6e9ed;
  border-radius: 14px;
  padding: 18px 18px 20px;
  box-shadow: 0 8px 24px rgb(31 37 41 / .14);
}

.wip-badge {
  display: inline-block;
  margin-bottom: 9px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff2d2;
  color: #936300;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.wip-title {
  margin: 0 0 5px;
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 900;
}

.wip-sub {
  margin: 0 0 14px;
  color: #5a6068;
  font-size: 12.5px;
  line-height: 1.5;
}

.wip-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border-radius: 999px;
  background: var(--color-gold);
  color: #3a2a00;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.tab-bar.is-wip {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 340px) {

  .site-logo {
    left: 15px;
  }

  .featured-image-section,
  .category-section,
  .recommended-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-grid {
    gap: 7px;
  }

  .category-card {
    grid-template-columns: 16px minmax(0, 1fr) 16px;
    height: 55px;
  }

  .category-icon-slot {
    width: 0;
    height: 0;
  }

  .category-label {
    font-size: 11px;
    transform: none;
  }

  .category-arrow {
    width: 9px;
    height: 9px;
    right: 8px;
  }

  .recommended-panel {
    border-radius: 8px;
  }

  .recommended-heading {
    height: 44px;
    font-size: 17px;
  }

  .recommended-item {
    grid-template-columns: 54px minmax(0, 1fr) 25px;
    height: 56px;
  }

  .tool-icon-slot {
    width: 36px;
    height: 36px;
  }

  .recommended-name {
    font-size: 13px;
  }

  .recommended-desc {
    font-size: 10.5px;
  }

  .more-tools-link {
    height: 52px;
    font-size: 15px;
  }

  .tab-label {
    font-size: 9px;
  }

  .tab-icon-slot {
    width: 22px;
    height: 22px;
  }
}