@charset "UTF-8";

/* =========================================
   App Store版 共通
   ========================================= */

:root {
  --ios-bg: #f7efe3;
  --ios-bg-soft: #fffaf2;
  --ios-card: rgba(255, 255, 255, 0.94);
  --ios-text: #2d2118;
  --ios-sub: #70645a;
  --ios-line: rgba(80, 55, 30, 0.14);
  --ios-accent: #8a5a2b;
  --ios-accent-dark: #5b3518;
  --ios-gold: #d2a451;
  --ios-shadow: 0 14px 32px rgba(58, 36, 16, 0.12);
  --ios-radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ios-bg);
}

.ios-app-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(180deg, #f8efe2 0%, #f5eadb 45%, #efe2d0 100%);
  color: var(--ios-text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
}

/* =========================================
   Header
   ========================================= */

.ios-app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: rgba(247, 239, 227, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(100, 70, 40, 0.12);
}

.ios-app-header__inner {
  height: 56px;
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 14px;
}

.ios-app-header__left,
.ios-app-header__right {
  display: flex;
  align-items: center;
}

.ios-app-header__right {
  justify-content: flex-end;
}

.ios-app-header__brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ios-text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.ios-app-header__logo {
  color: var(--ios-gold);
  font-size: 15px;
}

.ios-app-header__title {
  font-size: 16px;
}

.ios-back-button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--ios-accent-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.ios-back-button__mark {
  font-size: 28px;
  line-height: 1;
}

.ios-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--ios-line);
  color: var(--ios-accent-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

/* =========================================
   Home
   ========================================= */

.ios-home {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 16px 34px;
}

.ios-hero {
  padding: 28px 4px 18px;
}

.ios-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--ios-line);
  color: var(--ios-accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ios-hero__title {
  margin: 0;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ios-text);
}

.ios-hero__lead {
  margin: 18px 0 0;
  color: var(--ios-sub);
  font-size: 15px;
  line-height: 1.9;
}

.ios-hero__note {
  margin-top: 14px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(210, 164, 81, 0.35);
  color: #6b4a22;
  font-size: 13px;
  font-weight: 700;
}

/* =========================================
   Profile card
   ========================================= */

.ios-profile-card {
  margin: 12px 0 26px;
  padding: 16px;
  border-radius: var(--ios-radius);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--ios-line);
  box-shadow: 0 10px 24px rgba(58, 36, 16, 0.08);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  align-items: center;
}

.ios-profile-card__label {
  grid-column: 1 / -1;
  color: var(--ios-sub);
  font-size: 12px;
  font-weight: 800;
}

.ios-profile-card__main {
  min-width: 0;
}

#profileName {
  display: block;
  color: var(--ios-text);
  font-size: 18px;
  font-weight: 800;
}

.ios-profile-card__stars {
  display: block;
  margin-top: 4px;
  color: var(--ios-sub);
  font-size: 12px;
  line-height: 1.5;
}

.ios-profile-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--ios-accent-dark);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

/* =========================================
   Section / menu
   ========================================= */

.ios-section {
  margin-top: 10px;
}

.ios-section__title {
  margin: 0 0 14px;
  padding: 0 4px;
  color: var(--ios-text);
  font-size: 18px;
  font-weight: 900;
}

.ios-menu-grid {
  display: grid;
  gap: 13px;
}

.ios-menu-card {
  position: relative;
  min-height: 102px;
  display: grid;

  grid-template-columns: 52px 1fr;

  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: var(--ios-card);
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: var(--ios-shadow);
  color: var(--ios-text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ios-menu-card:active {
  transform: scale(0.985);
  box-shadow: 0 8px 18px rgba(58, 36, 16, 0.10);
}

.ios-menu-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(245, 231, 206, 0.95));
  border: 1px solid rgba(210, 164, 81, 0.32);
  font-size: 25px;
}

.ios-menu-card__body {
  min-width: 0;
}

.ios-menu-card__body h3 {
  margin: 0;
  color: var(--ios-text);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 900;
}

.ios-menu-card__body p {
  margin: 6px 0 0;
  color: var(--ios-sub);
  font-size: 13px;
  line-height: 1.55;
}

.ios-menu-card__arrow {
  color: rgba(80, 55, 30, 0.45);
  font-size: 30px;
  line-height: 1;
}

.ios-menu-card--learn {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 232, 0.96));
}

/* =========================================
   About
   ========================================= */

.ios-about {
  margin-top: 24px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.78);
  border: 1px solid var(--ios-line);
}

.ios-about h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 900;
}

.ios-about p {
  margin: 0;
  color: var(--ios-sub);
  font-size: 13px;
  line-height: 1.8;
}

.ios-about p + p {
  margin-top: 12px;
}

.ios-about__small {
  font-size: 12px !important;
}

/* =========================================
   Footer
   ========================================= */

.ios-app-footer {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 16px calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ios-sub);
}

.ios-app-footer__brand {
  color: var(--ios-text);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ios-app-footer__text {
  margin: 8px auto 14px;
  max-width: 520px;
  font-size: 12px;
  line-height: 1.7;
}

.ios-app-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.ios-app-footer__links a {
  color: var(--ios-accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.ios-app-footer__copy {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(70, 55, 42, 0.68);
}

/* =========================================
   home メニュー内 guide ボタン
   ========================================= */

.ios-home-menu-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.ios-home-main-btn,
.ios-home-main-btn:link,
.ios-home-main-btn:visited {
  width: 100%;
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 999px;
  padding: 0 16px;

  background: #2d2118;
  color: #ffffff !important;

  font-size: 14px;
  font-weight: 900;
  text-decoration: none;

  box-shadow: 0 10px 20px rgba(45, 33, 24, 0.16);
}

.ios-home-guide-btn,
.ios-home-guide-btn:link,
.ios-home-guide-btn:visited {
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 13px;
  border-radius: 999px;

  background: rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(80, 55, 30, 0.14);

  color: #5b3518 !important;

  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.ios-home-guide-btn::after {
  content: "›";
  margin-left: 6px;
  font-size: 17px;
  line-height: 1;
}

.ios-home-main-btn:active,
.ios-home-guide-btn:active {
  transform: scale(0.985);
}

/* =========================================
   home専用：footer_legal 固定・コンパクト表示
   ========================================= */

body.ios-home-page .ios-home {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

body.ios-home-page .ios-app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;

  width: 100%;
  max-width: none;
  margin: 0;

  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));

  background: rgba(255, 250, 242, 0.98);
  border-top: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 -10px 24px rgba(45, 33, 24, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  text-align: center;
}

body.ios-home-page .ios-app-footer__brand {
  font-size: 13px;
  line-height: 1.2;
  margin: 0;
}

body.ios-home-page .ios-app-footer__text {
  display: none;
}

body.ios-home-page .ios-app-footer__links {
  margin-top: 4px;
  gap: 6px;
  font-size: 11px;
  line-height: 1.25;
}

body.ios-home-page .ios-app-footer__links a {
  padding: 2px 4px;
}

body.ios-home-page .ios-app-footer__copy {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
}

/* =========================================
   Home AI loading
   日々の運勢・月々の運勢用
   ========================================= */

.ios-home-main-btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.96;
  animation: iosAiButtonPulse 1.05s ease-in-out infinite;
}

.ios-home-main-btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 8px;

  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;

  animation: iosAiSpin 0.8s linear infinite;
}

.ios-home-main-btn.is-disabled {
  pointer-events: none;
}

body.ios-home-routing .ios-home-guide-btn {
  pointer-events: none;
  opacity: 0.55;
}

.ios-ai-loading {
  position: fixed;
  inset: 0;
  z-index: 10050;

  display: grid;
  place-items: center;

  padding: 20px;
  background: rgba(45, 33, 24, 0.28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.ios-ai-loading.is-show {
  opacity: 1;
  pointer-events: auto;
}

.ios-ai-loading__card {
  width: min(100%, 320px);
  padding: 22px 20px;

  border-radius: 24px;
  background: rgba(255, 250, 242, 0.98);
  border: 1px solid rgba(90, 60, 30, 0.16);
  box-shadow: 0 18px 44px rgba(45, 33, 24, 0.22);

  text-align: center;
  color: #2d2118;
}

.ios-ai-loading__spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;

  border-radius: 50%;
  border: 3px solid rgba(90, 60, 30, 0.18);
  border-top-color: #5b3518;

  animation: iosAiSpin 0.85s linear infinite;
}

.ios-ai-loading__title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.ios-ai-loading__text {
  margin: 9px 0 0;
  color: #70645a;
  font-size: 13px;
  line-height: 1.7;
}

@keyframes iosAiSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes iosAiButtonPulse {
  0%, 100% {
    box-shadow: 0 10px 20px rgba(45, 33, 24, 0.16);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 14px 30px rgba(45, 33, 24, 0.28);
    transform: scale(0.99);
  }
}

/* =========================================
   Legal pages
   利用規約・プライバシー・会社概要
   ========================================= */

body.ios-legal-page {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.9), transparent 36%),
    linear-gradient(180deg, #f8efe2 0%, #f5eadb 45%, #efe2d0 100%) !important;
}

body.ios-legal-page .legal-main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px 16px calc(104px + env(safe-area-inset-bottom));
  color: #2d2118;
}

body.ios-legal-page .legal-title {
  margin: 16px 4px 18px;
  color: #2d2118;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

body.ios-legal-page .legal-section {
  margin: 14px 0;
  padding: 18px;

  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,248,232,0.94));
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 10px 24px rgba(58, 36, 16, 0.10);
}

body.ios-legal-page .legal-section h2,
body.ios-legal-page .legal-section h3 {
  position: relative;
  margin: 0 0 12px;
  padding-left: 12px;

  color: #2d2118;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.4;
}

body.ios-legal-page .legal-section h2::before,
body.ios-legal-page .legal-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;

  width: 4px;
  border-radius: 999px;
  background: #8a5a2b;
}

body.ios-legal-page .legal-section h2::after,
body.ios-legal-page .legal-section h3::after {
  content: "";
  display: block;

  width: 74px;
  height: 3px;
  margin-top: 8px;

  border-radius: 999px;
  background: linear-gradient(to right, #8a5a2b, rgba(210, 164, 81, 0.35));
}

body.ios-legal-page .legal-section p,
body.ios-legal-page .legal-section li {
  color: #3a2d22;
  font-size: 14px;
  line-height: 1.9;
  font-weight: 500;
}

body.ios-legal-page .legal-section p {
  margin: 10px 0;
}

body.ios-legal-page .legal-section p:first-child {
  margin-top: 0;
}

body.ios-legal-page .legal-section p:last-child {
  margin-bottom: 0;
}

body.ios-legal-page .legal-section ul {
  margin: 10px 0;
  padding-left: 1.25em;
}

body.ios-legal-page .legal-section li {
  margin: 6px 0;
}

body.ios-legal-page .legal-updated {
  color: #70645a !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}





/* =========================================
   Responsive
   ========================================= */

@media (min-width: 680px) {
  .ios-menu-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ios-menu-card {
    min-height: 132px;
    align-items: start;
  }
}

@media (max-width: 360px) {
  .ios-app-header__inner {
    grid-template-columns: 74px 1fr 74px;
    padding: 0 10px;
  }

  .ios-settings-button {
    min-width: 42px;
    padding: 0 9px;
  }

  .ios-menu-card {

    grid-template-columns: 46px 1fr;

    gap: 11px;
    padding: 14px;
  }

  .ios-menu-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 23px;
  }

  .ios-home-menu-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ios-home-guide-btn,
  .ios-home-guide-btn:link,
  .ios-home-guide-btn:visited {
    width: 100%;
  }


}