@charset "UTF-8";

/* ==========================================
   ベース
   ========================================== */

/* 横スクロール完全防止 */
html, body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fdfbf7;
    color: #5a4632;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.container {
    padding: 1em;
}

h1 {
    font-size: 18px;
    margin: 0 0 10px;
    color: #3e2723;
}

button {
    margin-top: 10px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: bold;
    background: #81c784;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #66bb6a;
}

button:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
}

.ad-label {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin: 1em 4px;
}

/* ================================
   ヘッダー
================================ */
.site-header {
  width: 100%;
  height: 56px;
  background: #fff;
  position: relative;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.header-left {
  display: flex;
  margin: 0 auto;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.header-left:hover {
  opacity: 0.85;
}

.logo {
  height: 56px;
}

.siteName {
  height: 46px;
  display: block;
}

/* ================================
   ハンバーガー
================================ */
.menu-button {
  width: 36px;
  height: 36px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 0;
}

.menu-button:hover {
  background: none;
}

.slide-menu {
  position: absolute;
  top: 56px;
  right: 0;
  width: 0;
  overflow: hidden;
  background: #fff;
  border-left: 1px solid #e0e0e0;
  box-shadow: -2px 0 10px rgba(0,0,0,0.05);
  transition: width 0.3s ease, padding 0.3s ease;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  z-index: 999;
}

.slide-menu a {
  padding: 12px 16px;
  color: #5a4632;
  text-decoration: none;
  font-size: 1em;
}

.slide-menu a:hover {
  background-color: #f1f8e9;
  color: #689f38;
}

.slide-menu.open {
  width: 200px;
  padding: 16px 0;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 3px;
  background: #5a4632;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-button.active span:nth-child(1) {
  transform: translateY(12px) rotate(45deg);
}

.menu-button.active span:nth-child(2) {
  opacity: 0;
}

.menu-button.active span:nth-child(3) {
  transform: translateY(-12px) rotate(-45deg);
}

/* ==========================================
   ID部分
   ========================================== */
#userIdCard {
    margin-bottom: 1em;
}

#toggleIdMaskBtn {
    padding: 4px 10px;
}

/* ==========================================
   位置情報
   ========================================== */
#locationLockScreen {
    background: #fff;
    border: 2px solid #d7ccc8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#locationLockScreen p {
    font-size: 14px;
    color: #795548;
    margin-bottom: 12px;
    line-height: 1.5;
}

#getLocationButton {
    background: #81c784;
}

#mainAppArea {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#locationInfoDisplay {
    margin-bottom: 8px;
}

.location-badge {
    display: inline-block;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #388e3c;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

#status {
    margin-top: 6px;
    min-height: 22px;
    color: #6d4c41;
    font-size: 12px;
    background: #efebe9;
    padding: 6px 8px;
    border-radius: 4px;
}

/* ==========================================
   カメラ
   ========================================== */
#cameraWrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(2);
    transform-origin: center center;
}

#scanArea {
    position: absolute;
    left: 4%;
    top: 37.5%;
    width: 92%;
    height: 25%;
    border: 3px solid #ff80ab;
    box-shadow: 0 0 8px rgba(255, 128, 171, 0.5);
    pointer-events: none;
}

#scanLabel {
    position: absolute;
    left: 4%;
    top: calc(37.5% - 26px);
    font-size: 12px;
    color: #fff;
    background: #ff80ab;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* ==========================================
   セクション
   ========================================== */
.section {
    margin-top: 14px;
}

.sectionTitle {
    font-size: 13px;
    color: #8d6e63;
    margin-bottom: 6px;
}

#slotResultContainer {
    background: #fff;
    border: 2px solid #81c784;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    display: none;
}

#snapshotPreview {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
}

#resetScanButton {
    background: #9e9e9e;
    margin-left: 6px;
}

#resetScanButton:hover {
    background: #757575;
}

/* ==========================================
   券種
   ========================================== */
.note-type-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.note-btn {
    margin-top: 0;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.note-btn:hover {
    background: #eeeeee;
}

.note-btn.selected {
    background: #6d4c41;
    color: #fff;
    border-color: #6d4c41;
}

/* ==========================================
   記番号
   ========================================== */
.slot-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    width: 100%;
    overflow-x: auto;
}

.slot-toggle-block {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d7ccc8;
    border-radius: 5px;
    overflow: hidden;
}

.mode-tabs {
    display: flex;
    background: #efebe9;
    border-bottom: 1px solid #d7ccc8;
    font-size: 10px;
}

.mode-tab {
    flex: 1;
    padding: 3px 6px;
    text-align: center;
    color: #8d6e63;
    cursor: pointer;
    user-select: none;
}

.mode-tab.active {
    background: #81c784;
    color: #fff;
    font-weight: bold;
}

.slot-group {
    display: flex;
    gap: 2px;
    align-items: center;
    padding: 3px;
    justify-content: center;
}

.slot-cell {
    width: 26px;
    height: 38px;
    background: #fff;
    border: 2px solid #a5d6a7;
    color: #2e7d32;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.slot-cell.alpha {
    border-color: #a5d6a7;
    color: #2e7d32;
    background: #e8f5e9;
}

.slot-cell.num {
    border-color: #90caf9;
    color: #1565c0;
    background: #e3f2fd;
}

.slot-cell.selected {
    border-color: #ff80ab !important;
    background: #fce4ec !important;
    color: #c2185b !important;
    box-shadow: 0 0 8px rgba(255, 128, 171, 0.3);
}

/* ==========================================
   キーボード
   ========================================== */
.custom-keyboard {
    background: #efebe9;
    border: 1px solid #d7ccc8;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 10px;
    display: none;
}

.keyboard-text {
    font-size: 11px;
    color: #388e3c;
    margin-bottom: 4px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.key-btn {
    margin: 0;
    padding: 0;
    width: 30px;
    height: 36px;
    background: #fff;
    color: #5d4037;
    border: 1px solid #d7ccc8;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.key-btn:active {
    background: #d7ccc8;
}

.key-btn.action {
    width: 56px;
    background: #b3e5fc;
    border-color: #81d4fa;
    color: #0277bd;
    font-size: 12px;
}

/* ==========================================
   カード
   ========================================== */
#myActivitySection,
#recentActivitySection {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.recent-posts-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.recent-card {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    padding: 10px;
}

.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    border-bottom: 1px solid #ffcc80;
    padding-bottom: 4px;
}

.badge-note {
    background: #ff80ab;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
}

.serial-num {
    font-size: 16px;
    font-weight: bold;
    color: #388e3c;
    letter-spacing: 1px;
}

.recent-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #6d4c41;
}

.info-row {
    display: flex;
    gap: 4px;
}

.info-row .label {
    color: #a1887f;
}

.info-row .val {
    color: #3e2723;
}

.no-data {
    font-size: 12px;
    color: #9e9e9e;
    text-align: center;
    padding: 10px;
}

.link-to-list-wrap {
    text-align: center;
    margin-top: 10px;
}

.list-link-btn {
    display: inline-block;
    width: 100%;
    padding: 10px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s;
}

.list-link-btn:hover {
    background: #c8e6c9;
}

/* ===============================
   ページネーション
=============================== */
.pagination {
    text-align: center;
    margin: 30px -10px;
}

.pagination a {
    display: inline-block;
    padding: 6px 10px;
    margin: 4px 2px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #2773ae;
    font-weight: 600;
    transition: 0.2s;
    font-size: 14px;
}

.pagination a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.pagination a.active {
    background: #2773ae;
    color: #fff;
    cursor: default;
}

.pagination-dots {
    display: inline-block;
    margin: 0 6px;
    color: #888;
    font-size: 14px;
}

/* ===============================
   個別ページ専用スタイル
=============================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.container h1,
.container h2,
.container h3 {
    font-size: 1.2rem;
    border-bottom: 2px solid #eee;
    margin-top: 0;
}

.container h2 {
    font-size: 1rem;
}

.container h3 {
    font-size: 1rem;
    margin-left: .5em;
}

.container h2.section-top {
    margin-top: 2em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.stat-card {
    background: #f4f6f8;
    padding: .5em;
    border-radius: 8px;
    text-align: center;
}

.stat-card .label {
    font-size: 0.8rem;
    color: #666;
}

.stat-card .value {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 4px;
}

.map_text {
    margin-bottom: 0;
}

#map {
    height: 350px;
    width: 100%;
    border-radius: 8px;
    margin: 0 0 2em;
}

.timeline {
    margin-top: 20px;
}

.timeline-item {
    padding: 10px 15px;
    border-left: 3px solid #007bff;
    margin-bottom: 10px;
    background: #fafafa;
    border-radius: 0 6px 6px 0;
}

.timeline-date {
    font-size: 0.8rem;
    color: #888;
}

.not-found {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 個別ページ用ナビゲーション・戻るボタン */
.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 420px;
    margin: 20px auto;
    padding: 0.5em 2em;
}

.detail-nav a {
    font-size: 16px;
    color: #2773ae;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 18px;
    background: #f2faff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.detail-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.detail-nav span {
    width: 120px;
    height: 44px;
    display: inline-block;
}

.back {
    text-align: center;
    margin-top: 20px;
}

.back a {
    display: inline-block;
    padding: 10px 18px;
    background: #f2faff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #2773ae;
    font-weight: 600;
    transition: 0.2s;
}

.back a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* ================================
   SNS
================================ */
.sns-share {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 24px;
}

.sns-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #a1887f;
  font-size: 15px;
}

.sns-title::before,
.sns-title::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #d7ccc8;
  margin: 0 1em;
}

.sns-title span {
  padding: 0 0.5em;
}

.sns-icons {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.sns-icons img {
  width: 50px;
  height: 50px;
  border: 1px solid #d7ccc8;
  border-radius: 50%;
  padding: 4px;
  background: #fff;
  transition: all 0.25s ease;
}

.sns-icons img:hover {
  opacity: 0.7;
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ================================
   フッター
================================ */
.footer-wrapper {
    text-align: center;
    padding: 10px 0 40px;
    color: #8d6e63;
    font-size: 14px;
}

.footer-home {
    display: inline-block;
    margin-bottom: 5px;
    font-size: 15px;
    text-decoration: none;
    color: #8d6e63;
    font-weight: bold;
}

.footer-home:hover {
    color: #5d4037;
}

.footer-links a {
    color: #8d6e63;
    text-decoration: none;
    margin: 0 4px;
}

.footer-links a:hover {
    color: #5d4037;
    text-decoration: underline;
}

.sep {
    display: none;
}