/* =========================================
   トキリア - style.css
========================================= */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #fffafb;
  --text: #222222;
  --muted: #777777;
  --line: #ececf1;
  --primary: #ff6b81;
  --primary-dark: #f2546d;
  --primary-soft: #fff0f3;
  --sub: #f4f5f7;
  --sub-text: #555555;
  --success: #22a06b;
  --warning: #c98a00;
  --danger: #d64545;
  --shadow: 0 8px 24px rgba(20, 20, 20, 0.06);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --container: 720px;
  --container-chat: 860px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Noto Sans JP",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  min-height: 100vh;
  background: var(--bg);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px 24px;
}

.container.with-fixed-action {
  padding-bottom: 110px;
}

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

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
  position: sticky;
  top: 0;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 18px;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.header-text {
  min-width: 0;
}

.header-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #222;
}

.header-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================
   Section / Card
========================================= */

.section {
  margin-top: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}

.card,
.card-soft,
.note-box,
.menu-box,
.profile-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
}

.card-soft {
  padding: 16px;
  background: var(--surface-soft);
}

.note-box {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}

.text-center {
  text-align: center;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* =========================================
   Flash
========================================= */

.flash-box {
  margin-top: 14px;
}

.flash {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.7;
}

.flash-success {
  background: #eefaf4;
  color: #1c7d52;
  border-color: #ccefdc;
}

.flash-error {
  background: #fff2f2;
  color: #b43b3b;
  border-color: #ffd7d7;
}

.flash-info {
  background: #f2f7ff;
  color: #2c5da7;
  border-color: #d6e5ff;
}

/* =========================================
   Forms
========================================= */

.form-group {
  margin-bottom: 16px;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  margin-bottom: 8px;
}

.input,
.select,
.textarea,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select {
  width: 100%;
  border: 1px solid #dedee5;
  background: #fff;
  color: #222;
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea,
textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: #ff9baa;
  box-shadow: 0 0 0 4px rgba(255, 107, 129, 0.12);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* =========================================
   Buttons
========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.04s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-main {
  background: var(--primary);
  color: #fff;
}

.btn-main:hover {
  background: var(--primary-dark);
}

.btn-sub {
  background: var(--sub);
  color: var(--sub-text);
  border-color: #e7e7ec;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* =========================================
   Fixed action
========================================= */

.fixed-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(247, 248, 251, 0.94);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.fixed-action-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

/* =========================================
   Menu list
========================================= */

.menu-box {
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-right {
  color: #aaa;
  flex: 0 0 auto;
}

.menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex: 0 0 auto;
}

.menu-texts {
  min-width: 0;
}

.menu-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.menu-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* =========================================
   Badges / Pills
========================================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-match {
  background: #e9f8ef;
  color: #237a4a;
}

.badge-like {
  background: #fff3d9;
  color: #946700;
}

.badge-sub {
  background: #f1f2f6;
  color: #666;
}

/* =========================================
   Segmented tab
========================================= */

.segmented {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e8e8ee;
  color: #555;
  font-weight: 700;
}

.segmented-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.segmented-count {
  font-size: 12px;
  opacity: 0.9;
}

/* =========================================
   Avatars / profile summary
========================================= */

.avatar {
  border-radius: 999px;
  object-fit: cover;
  background: #f2f2f4;
  border: 1px solid var(--line);
}

.avatar-md {
  width: 56px;
  height: 56px;
}

.profile-summary-card {
  padding: 16px;
}

.profile-summary-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.profile-summary-image {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  background: #f2f2f4;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.profile-summary-main {
  min-width: 0;
}

.profile-summary-name {
  font-size: 22px;
  font-weight: 800;
  color: #222;
}

.profile-summary-age {
  font-size: 17px;
  color: #777;
  font-weight: 600;
}

.profile-summary-meta,
.profile-summary-email,
.profile-summary-appeal {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.profile-summary-appeal {
  color: #444;
}

/* =========================================
   Encounter / profile card grid
========================================= */

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

.profile-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.profile-image-wrap {
  position: relative;
}

.profile-image {
  width: 100%;
  aspect-ratio: 1 / 1.06;
  object-fit: cover;
  background: #f2f2f4;
}

.profile-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-body {
  padding: 14px 14px 8px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-name {
  font-size: 17px;
  font-weight: 800;
  color: #222;
}

.profile-age {
  font-size: 14px;
  font-weight: 600;
  color: #777;
}

.profile-meta,
.profile-submeta,
.profile-purpose,
.profile-appeal {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
}

.profile-meta,
.profile-submeta {
  color: var(--muted);
}

.profile-purpose,
.profile-appeal {
  color: #444;
}

.profile-actions {
  padding: 0 14px 14px;
}

/* =========================================
   Detail / info rows
========================================= */

.info-list {
  display: grid;
  gap: 10px;
}

.info-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.info-label {
  width: 88px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #777;
}

.info-value {
  min-width: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
}

/* =========================================
   Chat
========================================= */

.chat-page {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

.chat-page .container.with-fixed-action {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 112px;
}

.chat-page .header,
.chat-page .section {
  padding-left: 18px;
  padding-right: 18px;
}

.chat-row {
  display: flex;
  width: 100%;
}

.chat-row.mine {
  justify-content: flex-end;
}

.chat-row.other {
  justify-content: flex-start;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 0;
  padding-bottom: 4px;
}

.chat-bubble {
  max-width: min(58%, 360px);
  padding: 7px 12px 6px;
  border-radius: 15px;
  line-height: 1.32;
}

.chat-bubble > div:first-child {
  font-size: 14px;
}

.chat-bubble > div:last-child {
  margin-top: 2px;
  font-size: 9px;
}

.chat-row.other .chat-bubble {
  background: #f1f3f5;
  color: #333;
  border-top-left-radius: 8px;
}

.chat-row.mine .chat-bubble {
  background: #ff6b81;
  color: #fff;
  border-top-right-radius: 8px;
}

.chat-page .fixed-action {
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 860px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.chat-page .fixed-action-inner {
  max-width: 100%;
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-page .fixed-action textarea {
  flex: 1;
  min-height: 52px;
  max-height: 120px;
  resize: none;
  border-radius: 18px;
  padding: 14px 16px;
}

.chat-page .fixed-action .btn {
  min-width: 74px;
  height: 52px;
  border-radius: 18px;
  padding: 0 18px;
  writing-mode: horizontal-tb;
}

/* =========================================
   Utility
========================================= */

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.muted {
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .chat-page {
    max-width: 100%;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-title {
    font-size: 24px;
  }

  .profile-summary-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-summary-main {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .chat-page .header,
  .chat-page .section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-bubble {
    max-width: 82%;
    border-radius: 18px;
  }

  .fixed-action {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-page .fixed-action {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .fixed-action-inner {
    gap: 8px;
  }

  .chat-page .fixed-action .btn {
    min-width: 64px;
    height: 48px;
    border-radius: 16px;
  }
}

.photo-status-note {
  margin-top: 8px;
  padding: 12px 14px;
  background: #fff8e8;
  border: 1px solid #f3ddb0;
  border-radius: 14px;
  color: #7a5600;
  font-size: 13px;
  line-height: 1.7;
}

.photo-pending-card {
  position: relative;
}

.photo-pending-card .profile-image {
  opacity: 0.72;
}

.photo-pending-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.photo-pending-chip {
  background: rgba(122, 86, 0, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.badge-reviewing {
  background: #fff3d9;
  color: #946700;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.badge-like {
  background: #ff5f7a;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 95, 122, 0.28);
}

.badge-match {
  background: #ff8a00;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 138, 0, 0.24);
}

.badge-ng {
  background: #e85b5b;
  color: #fff;
  box-shadow: 0 4px 10px rgba(232, 91, 91, 0.22);
}

.badge-sub {
  background: #eef1f6;
  color: #5f6b7a;
}

.menu-title .badge {
  margin-left: 8px;
  transform: translateY(-1px);
}

.flash-info {
  background: #fff7e8;
  border: 1px solid #ffd89a;
  color: #7a5600;
  border-radius: 14px;
  padding: 12px 14px;
}

.flash-info a {
  color: #7a5600;
  text-decoration: underline;
}

.menu-item:hover .badge-like,
.menu-item:hover .badge-match {
  transform: translateY(-1px) scale(1.04);
  transition: 0.18s ease;
}

.menu-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.badge-like,
.badge-match {
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 12px;
  font-size: 13px;
}

.footer-links a {
  color: #666;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* =========================
   legal pages
   ========================= */

.legal-page {
  padding: 20px;
  line-height: 1.9;
  font-size: 14px;
  color: #333;
}

.legal-page p {
  margin: 0 0 14px;
}

.legal-page h2 {
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.legal-page ul {
  margin: 0 0 14px 20px;
  padding: 0;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-meta {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #666;
}

.legal-meta p {
  margin: 4px 0;
}

/* =========================
   legal table
   ========================= */

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
  background: #fff;
}

.legal-table th,
.legal-table td {
  border: 1px solid #e8e8e8;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}

.legal-table th {
  width: 34%;
  min-width: 120px;
  background: #fafafa;
  font-weight: 700;
  color: #222;
}

.legal-table td {
  background: #fff;
  color: #333;
  word-break: break-word;
}

.legal-table tr:first-child th {
  border-top-left-radius: 10px;
}

.legal-table tr:first-child td {
  border-top-right-radius: 10px;
}

.legal-table tr:last-child th {
  border-bottom-left-radius: 10px;
}

.legal-table tr:last-child td {
  border-bottom-right-radius: 10px;
}

/* =========================
   responsive
   ========================= */

@media (max-width: 768px) {
  .legal-page {
    padding: 16px;
    font-size: 13px;
    line-height: 1.8;
  }

  .legal-page h2 {
    font-size: 16px;
    margin: 24px 0 10px;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table tr {
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
  }

  .legal-table th {
    width: 100%;
    min-width: auto;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    background: #fafafa;
  }

  .legal-table td {
    border: none;
    padding: 12px;
  }

  .legal-table tr:first-child th,
  .legal-table tr:first-child td,
  .legal-table tr:last-child th,
  .legal-table tr:last-child td {
    border-radius: 0;
  }
}

/* =========================
   Hero section
   ========================= */

.hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: url('/images/hero/tokiria-hero.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255, 248, 250, 0.94) 0%,
      rgba(255, 248, 250, 0.88) 32%,
      rgba(255, 248, 250, 0.45) 58%,
      rgba(255, 248, 250, 0.12) 100%
    );
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}

.hero__content {
  max-width: 520px;
}

.hero__brand {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #f45f8a;
}

.hero__title {
  margin: 0 0 16px;
  font-size: 52px;
  line-height: 1.2;
  font-weight: 800;
  color: #2f2f35;
}

.hero__text {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.8;
  color: #5e5e66;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.hero__btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.hero__btn--primary {
  background: #f45f8a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(244, 95, 138, 0.24);
}

.hero__btn--secondary {
  background: rgba(255, 255, 255, 0.92);
  color: #f45f8a;
  border: 1px solid rgba(244, 95, 138, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 960px) {
  .hero {
    min-height: 620px;
    background-position: 68% center;
  }

  .hero__brand {
    font-size: 36px;
  }

  .hero__title {
    font-size: 42px;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 560px;
    background-position: 72% center;
  }

  .hero__overlay {
    background:
      linear-gradient(
        180deg,
        rgba(255, 248, 250, 0.90) 0%,
        rgba(255, 248, 250, 0.78) 38%,
        rgba(255, 248, 250, 0.52) 100%
      );
  }

  .hero__inner {
    padding: 48px 18px;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__brand {
    font-size: 32px;
    margin-bottom: 14px;
  }

  .hero__title {
    font-size: 34px;
    margin-bottom: 12px;
  }

  .hero__text {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 22px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__btn {
    width: 100%;
    min-width: 0;
    height: 52px;
  }
}





