@import url("./app-overlays.css?v=20260423al");
@import url("./app-home.css?v=20260421ac");
@import url("./app-detail.css?v=20260423al");
@import url("./app-recruit.css?v=20260423al");
@import url("./app-account.css?v=20260423am");

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --line: #dce3ef;
  --line-strong: #c5d0e4;
  --ink: #0f1b2d;
  --muted: #627089;
  --accent: #1f7a8c;
  --accent-soft: #ebf6f9;
  --danger: #b91c1c;
  --radius: 8px;
  --app-side-gap: 16px;
  --bottom-nav-space: calc(78px + env(safe-area-inset-bottom, 0px));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior-x: none;
  background: linear-gradient(180deg, #f7f8fc 0%, #f1f4f9 100%);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 108%;
  text-size-adjust: 108%;
}

input,
textarea,
select {
  font-size: 17px !important;
}

.mobile-app {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 100vw);
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background: linear-gradient(180deg, #f7f8fc 0%, #f1f4f9 100%);
  font-size: 16px;
}

#mobileApp,
#mobileApp * {
  scrollbar-width: none;
}

#mobileApp::-webkit-scrollbar,
#mobileApp *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow-x: hidden;
}

.screen.active {
  display: block;
}

.splash-screen {
  text-align: center;
}

.splash-screen.active {
  display: grid;
  place-content: center;
}

.splash-logo {
  width: clamp(96px, 30vw, 148px);
  max-height: clamp(96px, 30vw, 148px);
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.94);
  animation: splashFadeIn 0.45s ease forwards;
}

.auth-screen.active {
  display: block;
  overflow-y: auto;
  padding: 32px 16px 40px;
}

#appShell.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand-chip {
  display: inline-flex;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 12px;
  color: #0f172a;
  background: #ffffffc9;
}

.splash-title {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: 0.01em;
}

.splash-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.splash-loader {
  margin: 6px auto 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.auth-header h2,
.block h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}

.auth-header p,
.muted-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-card,
.block {
  margin-top: 6px;
  background: transparent;
  border-radius: var(--radius);
  padding: 8px 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-btn {
  border: 0;
  border-radius: 6px;
  min-height: 38px;
  background: #e9eef7;
  color: var(--muted);
}

.mode-btn.active {
  color: var(--ink);
  background: #ffffff;
  font-weight: 600;
  box-shadow: none;
}

.auth-form {
  display: grid;
  gap: 7px;
}

.auth-form label {
  font-size: 11px;
  color: var(--muted);
}

.auth-form input,
.toolbar select {
  width: 100%;
  min-height: 39px;
  border: 0;
  border-radius: 6px;
  background: #e9eef6;
  padding: 0 11px;
  color: var(--ink);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.primary-btn,
.ghost-btn,
.like-btn,
.icon-btn {
  border: 0;
  border-radius: 6px;
  min-height: 38px;
  background: #e9eef7;
  color: var(--ink);
  font-size: 13px;
}

.primary-btn {
  background: linear-gradient(135deg, #1f7a8c 0%, #2850d7 100%);
  color: #fff;
  font-weight: 600;
}

.ghost-btn {
  color: var(--muted);
}

.app-close-x-btn {
  border: 0;
  background: transparent;
  color: #5b6b84;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  border-radius: 0;
  box-shadow: none;
}

.app-close-x-btn:hover,
.app-close-x-btn:active,
.app-close-x-btn:focus-visible {
  background: transparent;
  color: #334760;
  outline: none;
}

/* Exception: detail panel close button sits on photo and needs contrast. */
.app-close-x-btn.detail-close-x-btn {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #1e2d44;
  box-shadow: 0 1px 6px rgba(10, 20, 36, 0.3);
}

.app-close-x-btn.detail-close-x-btn:hover,
.app-close-x-btn.detail-close-x-btn:active,
.app-close-x-btn.detail-close-x-btn:focus-visible {
  background: rgba(255, 255, 255, 0.95);
  color: #16243a;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 14px;
}

.auth-message {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  color: var(--danger);
}

.demo-account-hint {
  margin-top: 4px;
  padding: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  background: #f8fafc;
}

.demo-account-hint p {
  margin: 0;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  padding: 4px calc(var(--app-side-gap) + env(safe-area-inset-right, 0px)) 4px var(--app-side-gap);
}

.top-header-brand {
  min-width: 0;
}

.top-header-logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: min(42vw, 180px);
  object-fit: contain;
}

.top-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-icon-btn {
  position: relative;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4f647f;
  box-shadow: none;
}

.header-icon-btn:hover,
.header-icon-btn:active {
  background: transparent;
}

.header-icon-btn--active {
  color: #1f7a8c;
}

.header-icon {
  font-size: 17px;
  line-height: 1;
}

.mini-badge,
.badge {
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.mini-badge {
  min-width: 16px;
  min-height: 16px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
}

.header-icon-btn .mini-badge {
  position: absolute;
  top: -3px;
  right: -3px;
}

.view-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px var(--app-side-gap) calc(var(--bottom-nav-space) + 10px);
  position: relative;
}

.view {
  display: none;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-height: 100%;
}

.view.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.view-container.slide-left .view.active {
  animation: slideLeft 0.2s ease;
}

.view-container.slide-right .view.active {
  animation: slideRight 0.2s ease;
}

.view-container.slide-in-right .view.active {
  animation: slideInFromRight 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.selected-list,
.card-list,
.thread-list,
.quick-links {
  margin-top: 6px;
  display: grid;
  gap: 0;
}

.person-row,
.thread-row,
.link-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  background: transparent;
  border-radius: 0;
  padding: 12px 0;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

.thread-row {
  cursor: pointer;
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.thread-row > div {
  min-width: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #f1f5f9;
  object-fit: cover;
}

.person-main {
  min-width: 0;
}

.person-main h4,
.thread-row h4,
.link-row h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-sub,
.thread-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.filter-chips {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-chip,
.chip {
  border: 0;
  border-radius: 4px;
  background: #e9eef7;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 9px;
}

.filter-chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1f7a8c 0%, #2850d7 100%);
}

.action-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 42vw;
}

.like-btn {
  background: linear-gradient(135deg, #ffd2e0 0%, #ffdbe9 100%);
  color: #8a1f47;
}

.stat-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100vw);
  border-top: 0;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
  backdrop-filter: blur(10px);
  box-shadow: 0 -5px 14px rgba(21, 38, 72, 0.08);
}
.nav-item {
  border: 0;
  background: transparent;
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 2;
}

.nav-item.active {
  color: var(--accent);
  font-weight: 600;
}

.badge {
  position: absolute;
  top: 8px;
  right: 16%;
  min-width: 16px;
  min-height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.desktop-redirect {
  text-align: center;
  padding-top: 62px;
}

.recruit-editor-form {
  margin-bottom: 14px;
}

.recruit-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.recruit-editor-head h4 {
  margin: 0;
  font-size: 15px;
}

.recruit-toolbar {
  margin: 4px 0 14px;
  display: grid;
  gap: 10px;
}

.recruit-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recruit-filter-btn {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
  background: #e6edf8;
  color: #253a60;
  font-weight: 600;
}

.recruit-toolbar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.recruit-toolbar-grid input,
.recruit-toolbar-grid select {
  width: 100%;
  border: 0;
  border-radius: 12px;
  min-height: 52px;
  padding: 0 14px;
  font-size: 16px;
  background: #eef3f9;
  color: #1a2a44;
}

.recruit-toolbar-summary {
  margin-top: -1px;
  color: #566987;
  font-size: 12px;
}

.recruit-fab {
  position: fixed;
  right: calc((100vw - min(560px, 100vw)) / 2 + 14px);
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 6;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #204cbe;
}

.recruit-compose-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 0 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.recruit-compose-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.recruit-compose-head h4 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
  font-weight: 700;
  color: #0f1d35;
}

.recruit-compose-head .muted-copy {
  margin-top: 5px;
  font-size: 13px;
  color: #5a6d8b;
}

.recruit-editor-form .account-profile-actions {
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

#viewRecruit .block {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#recruitList {
  flex: 1;
}

.recruit-toolbar-grid select,
.recruit-editor-form .recruit-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #435372 50%), linear-gradient(135deg, #435372 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 4px), calc(100% - 12px) calc(50% - 4px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.recruit-editor-form .recruit-file-input {
  width: 100%;
  border: 0;
  border-radius: 0;
  min-height: 52px;
  padding: 8px;
  background: #eef3f9;
}

.recruit-editor-form .recruit-file-input::file-selector-button {
  border: 0;
  border-radius: 0;
  margin-right: 10px;
  padding: 9px 15px;
  color: #ffffff;
  background: #204cbe;
  font-weight: 600;
}

.recruit-file-name {
  margin: 6px 0 0;
  color: #617697;
}

.recruit-editor-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 12px;
}

.recruit-editor-form label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: #263a5f;
}

.recruit-editor-form input[type="text"],
.recruit-editor-form input[type="date"],
.recruit-editor-form .recruit-select,
.recruit-editor-form textarea {
  width: 100%;
  border: 1px solid #d0dcea;
  border-radius: 8px;
  min-height: 52px;
  padding: 0 14px;
  font-size: 16px;
  color: #1a2a44;
  background: #eef3f9;
}

.recruit-editor-form textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
}

.recruit-editor-form input:focus,
.recruit-editor-form select:focus,
.recruit-editor-form textarea:focus {
  outline: 2px solid rgba(32, 76, 190, 0.34);
  outline-offset: 0;
}

.recruit-photo-preview-wrap {
  margin: 2px 0 10px;
  min-height: 54px;
  display: flex;
  align-items: center;
}

.recruit-photo-preview {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d0dcea;
  background: #e9eff7;
}

.recruit-editor-form .ghost-btn {
  border: 1px solid #c8d8ee;
  border-radius: 8px;
  padding: 0 18px;
  min-height: 48px;
  background: #e5ecf7;
  color: #385074;
  font-weight: 600;
}

.recruit-editor-form .like-btn {
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  min-height: 48px;
  color: #fff;
  background: #204cbe;
  font-weight: 700;
}

@media (max-width: 460px) {
  .recruit-editor-form .account-profile-grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes detailContentRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes likeBalloonPop {
  0% { transform: translate(-50%, 12px) scale(0.92); }
  55% { transform: translate(-50%, -2px) scale(1.04); }
  100% { transform: translate(-50%, 0) scale(1); }
}

@keyframes matchHeartFloat {
  0% { transform: translateY(16px) scale(0.6) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-58px) scale(1.12) rotate(-6deg); opacity: 0; }
}

@keyframes matchTitlePulse {
  0% { transform: scale(0.7); opacity: 0; }
  45% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes recruitComposeClose {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .view,
  .view-container.slide-left .view.active,
  .view-container.slide-right .view.active,
  .view-container.slide-in-right .view.active,
  .splash-loader {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 460px) {
  .recruit-editor-head {
    flex-direction: column;
  }

  .recruit-fab {
    right: 10px;
  }
}
