:root {
  --main-bg-color: #fff;
  --header-footer-bg: #fff5d3;
  --button-bg: #ffa07a;
  --text-color: #333;
  --date-color: red;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: system-ui, sans-serif;
  background-color: var(--main-bg-color);
  color: var(--text-color);
  position: relative;
  overflow-x: hidden; /* 横スクロールを防止 */
}
a {
  text-decoration: none;
  color: var(--text-color);
}
ul, ol {
  padding: 0.5em 0.5em 0.5em 2em;
}

ul li, ol li {
  line-height: 1.5;
  padding: 0.5em 0;
}
header,
footer {
  background-color: var(--header-footer-bg);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

header {
	width: 100%;
	z-index: 1000;
	transition: all 0.3s ease;
}

header.fixed {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-bar.fixed {
    position: sticky;
    top: 88px; /* ヘッダーの高さ分調整 */
    z-index: 999;
	left:0;
	right:0;
}
.container {
  max-width: 600px;
  margin: 0 auto;

  h2 {
    text-align: center;
    margin: 30px 0;
    font-weight: normal;
  }
}

.logo {
  height: 65px;
}
.menu-button {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  background-color: var(--main-bg-color);
  padding: 3px 6px;
}
#menu {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100vh;
  background: var(--header-footer-bg);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  z-index: 2;
}
#menu .logo {
  height: auto;
  width: 100%;
  padding: 0 0 10px;
}
#menu.active {
  transform: translateX(250px);
  opacity: 1;
}
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu ul li {
  padding: 15px;
  border-bottom: 1px solid #ddd;
}
.menu ul li:last-child {
  border-bottom: none;
}
.menu ul li a {
  text-decoration: none;
  color: var(--text-color);
  display: block;
}

.register_and_login {
  display: grid;
  gap: 1rem;
  margin-top: 30px;

  a {
    text-align: center;
    display: inline-block;
    border: 1px solid #d9d9d9;
    height: 40px;
    line-height: 40px;
    background: #fff;
    text-decoration: none;
    color: #333;
    font-size: 14px;
  }
}

.search-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  max-width: 600px;
  width: 100%;
}
.search-bar select,
.search-button {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.search-bar select {
  text-align: center;
  height: 100%;
  margin: 0;
}
.search-button {
  background-color: var(--button-bg);
  color: white;
  border: none;
  cursor: pointer;
  width: 90px;
}
.feed-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feed-item {
  display: flex;
  column-gap: 13px;
  overflow: hidden;
  max-width: 600px;
  width: 100%;
  padding: 1rem;
  border-top: 1px solid #d9d9d9;
}
.feed-item:last-of-type {
  border-bottom: 1px solid #d9d9d9;
}
.feed-content {
  flex: 1;
  a {
    display: inline-block;
    width: 100%;
  }
  h3 {
    font-size: 24px;
    margin-bottom: 10px;
  }
  p {
    margin-bottom: 6px;
  }
  p,
  time {
    font-size: 14px;
  }
  .icon-container {
    display: flex;
    column-gap: 10px;
    align-items: center;
	justify-content: space-between;

    img {
      width: 25px;
      height: 25px;
    }
  }
}
.feed-image {
  width: 190px;
  height: auto;
  max-height: 125px;
  object-fit: cover;
}
.date {
  color: var(--date-color);
}
footer {
  display: flex;
  column-gap: 40px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 1rem;
  position: relative;
  .logo-container p {
    font-size: 14px;
    margin: 0 15px;
  }
}
footer .logo {
  height: 85px;
}
.footer-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 40px;
}

.footer-menu li::before {
  font: var(--fa-font-solid);
  content: "\f04b";
  color: #ff3131;
  margin-right: 8px;
}
.footer-menu a {
  text-decoration: none;
  color: var(--text-color);
}

.top-button {
  position: absolute;
  bottom: 30px;
  right: 30px;
  padding: 15px 15px;
  border: none;
  background: var(--main-bg-color);
  cursor: pointer;

  i {
    color: #ff3131;
  }
}

/* フォーム全体 */
form {
  margin: 0 auto;
  padding: 24px 16px;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: "Helvetica Neue", sans-serif;
}

/* フォームのラベル */
form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

/* 入力欄共通のスタイル */
form input[type="text"],
form input[type="url"],
form input[type="date"],
form input[type="number"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* テキストエリア */
form textarea {
  min-height: 100px;
  resize: vertical;
}

/* ファイル選択ボタン */
form input[type="file"] {
  margin-bottom: 16px;
}

/* 送信ボタン */
form input[type="submit"] {
  background-color: #ff9900;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border: none;
  padding: 12px 0;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
  background-color: #e08900;
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
  form {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .feed-item {
    flex-direction: column-reverse;

    .feed-image {
      width: 100%;
      max-height: 250px;
      margin-bottom: 10px;
    }
  }
  footer {
    flex-direction: column;
    gap: 1rem;

    .footer-menu ul {
      flex-direction: inherit;
      flex-wrap: wrap;
      margin-bottom: 80px;
    }
  }
}

.page .container {
  margin: 40px auto;

  h1 {
    margin-bottom: 40px;
    padding: 0 1rem;
  }

  h2 {
    margin: 0;
    font-size: 18px;
    text-align: inherit;
  }

  .post-content {
    width: calc(100% - 2rem);
    margin: 0 auto;
	  
	h2 {
	  font-size: 22px;
	  font-weight: bold;
	  line-height: 1.8;
	  margin: 1rem 0;
	}
	p {
	  line-height: 1.6;
	  letter-spacing: 0.05em;
	  margin: .8em 0;
	}
  }

/* ============================================================
   iOS「ホーム画面に追加」案内バナー
   ============================================================ */
#ios-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.ios-banner__text {
  flex: 1;
  color: #333;
}
#ios-banner-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #aaa;
  cursor: pointer;
  padding: 4px 8px;
  flex-shrink: 0;
}

/* ============================================================
   マイアカウントページ
   ============================================================ */
.ma-page {
  padding: 0 16px 60px;
}

/* ヘッダー（アバター＋名前） */
.ma-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0 20px;
  border-bottom: 1px solid #efefef;
  margin-bottom: 20px;
}
.ma-hero__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--button-bg);
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ma-hero__name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 2px;
}
.ma-hero__company {
  font-size: 13px;
  color: #888;
}

/* 通知バー */
.ma-notice {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.ma-notice--success {
  background: #e6f4ea;
  color: #2e7d32;
  border-left: 4px solid #43a047;
}
.ma-notice--error {
  background: #fdecea;
  color: #c62828;
  border-left: 4px solid #e53935;
}

/* サマリーカード */
.ma-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.ma-stat {
  background: #f9f9f9;
  border: 1px solid #efefef;
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}
.ma-stat--accent {
  background: #fff8f0;
  border-color: #ffd580;
}
.ma-stat__value {
  display: block;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ma-stat--accent .ma-stat__value {
  color: #e07b00;
}
.ma-stat__label {
  display: block;
  font-size: 11px;
  color: #888;
}

/* タブ */
.ma-tabs {
  display: flex;
  border-bottom: 2px solid #efefef;
  margin-bottom: 20px;
}
.ma-tab {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.ma-tab--active {
  color: #333;
  border-bottom-color: var(--button-bg);
}

/* パネル */
.ma-panel--hidden {
  display: none;
}

/* 広告テーブル */
.ma-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #efefef;
  border-radius: 8px;
  margin-bottom: 16px;
}
.ma-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}
.ma-table th {
  background: #f5f5f5;
  padding: 10px 12px;
  text-align: left;
  font-weight: bold;
  color: #555;
  border-bottom: 1px solid #e0e0e0;
}
.ma-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.ma-table tr:last-child td {
  border-bottom: none;
}
.ma-table__name {
  font-weight: bold;
  max-width: 120px;
  word-break: break-all;
}
.ma-table__period {
  white-space: nowrap;
  color: #666;
}
.ma-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ステータスバッジ */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}
.badge--active  { background: #e6f4ea; color: #2e7d32; }
.badge--ended   { background: #f0f0f0; color: #777;    }
.badge--pending { background: #fff3e0; color: #e07b00; }

/* 編集ボタン（テーブル内） */
.ma-btn-edit {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #ffa07a;
  border-radius: 4px;
  color: #ffa07a;
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.ma-btn-edit:hover {
  background: #ffa07a;
  color: #fff;
}

/* 新規投稿ボタンエリア */
.ma-new-ad {
  text-align: center;
  margin-top: 12px;
}
.ma-empty {
  text-align: center;
  padding: 32px 0;
  color: #888;
}
.ma-empty p {
  margin-bottom: 16px;
}

/* プライマリボタン */
.ma-btn-primary {
  display: inline-block;
  background: var(--button-bg);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  border-radius: 6px;
  transition: background 0.2s;
}
.ma-btn-primary:hover {
  background: #e07a5a;
  color: #fff;
}

/* プロフィールフォーム */
.ma-form {
  padding: 0 !important;
  background: none !important;
}
.ma-form__group {
  margin-bottom: 18px;
}
.ma-form__group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #444;
}
.ma-required {
  background: #e53935;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
}
.ma-optional {
  font-size: 12px;
  font-weight: normal;
  color: #999;
}
.ma-form__section {
  border: 1px solid #efefef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.ma-form__section-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ma-hint {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: -10px;
  margin-bottom: 10px;
}
.ma-btn-submit {
  width: 100%;
  background: #ff9900;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border: none;
  padding: 14px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.ma-btn-submit:hover {
  background: #e08900;
}

/* ============================================================
   広告投稿・編集フォームページ
   ============================================================ */
.af-page {
  padding: 0 16px 60px;
}

/* ヘッダー */
.af-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid #efefef;
  margin-bottom: 24px;
}
.af-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 4px;
  text-align: left;
}
.af-subtitle {
  font-size: 13px;
  color: #888;
}

/* セクション */
.af-form {
  padding: 0 !important;
  background: none !important;
}
.af-section {
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 10px;
  padding: 20px 16px;
  margin-bottom: 16px;
}
.af-section__title {
  font-size: 14px;
  font-weight: bold;
  color: #444;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* フィールド */
.af-field:last-child {
  margin-bottom: 0;
}
.af-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: bold;
  color: #444;
  margin-bottom: 6px;
}
.af-req {
  background: #e53935;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: normal;
}
.af-opt {
  background: #e0e0e0;
  color: #666;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: normal;
}
.af-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--text-color);
}
.af-input:focus {
  outline: none;
  border-color: var(--button-bg);
  background: #fff;
}
.af-textarea {
  min-height: 90px;
  resize: vertical;
}

/* select 専用：カスタム矢印 */
select.af-input {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.af-hint {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}
.af-char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #aaa;
  margin-top: 4px;
}

/* 画像アップロード */
.af-image-preview {
  border: 2px dashed #ddd;
  border-radius: 8px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fafafa;
  cursor: pointer;
}
.af-image-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
}
.af-image-current {
  margin-bottom: 10px;
}
.af-image-current img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #efefef;
  margin-bottom: 6px;
}
.af-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #bbb;
  font-size: 13px;
  padding: 20px;
}
.af-image-icon {
  font-size: 32px;
}
.af-file-label {
  display: block;
  text-align: center;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  transition: background 0.2s;
}
.af-file-label:hover {
  background: #e4e4e4;
}
.af-file-label input[type="file"] {
  display: none;
}

/* 掲載期間（横並び） */
.af-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8px;
}
.af-date-sep {
  display: none;
}

/* 料金入力（サフィックス） */
.af-input-suffix {
  position: relative;
}
.af-input-suffix .af-input {
  padding-right: 36px;
}
.af-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #888;
  pointer-events: none;
}

/* 送信エリア */
.af-submit {
  padding-top: 8px;
  text-align: center;
}
.af-btn-submit {
  width: 100%;
  background: #ff9900;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border: none;
  padding: 15px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.05em;
}
.af-btn-submit:hover {
  background: #e08900;
}
.af-submit-note {
  font-size: 12px;
  color: #aaa;
  margin-top: 10px;
}

/* ============================================================
   ユーザー登録ページ
   ============================================================ */
.reg-page {
  padding: 0 16px 60px;
}
.reg-title {
  text-align: center;
  margin: 30px 0 8px;
  font-weight: bold;
}
.reg-lead {
  text-align: center;
  font-size: 13px;
  color: #777;
  margin-bottom: 24px;
  line-height: 1.6;
}
.reg-form {
  padding: 0 !important;
  background: none !important;
}
.reg-form__section {
  border: 1px solid #efefef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  background: #fff;
}
.reg-card-element {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.2s;
}
.reg-card-element.StripeElement--focus {
  border-color: #ff9900;
}
.reg-card-element.StripeElement--invalid {
  border-color: #e53935;
}
.reg-card-errors {
  font-size: 12px;
  color: #e53935;
  margin-top: 6px;
  min-height: 1em;
}
}
