/* 渋谷（三宿）の求人 相談の窓（オーナー様LPの owner-chat.css を写して、色だけ求人ページに合わせた）2026-11-02 */
:root {
  --oc-ink: #17150F;
  --oc-gold: #B29C6C;
  --oc-gold-light: #D4B87A;
  --oc-paper: #F4F2ED;
  --oc-bubble: #FFFFFF;
  --oc-text: #1D1D1B;
  --oc-sub: #6E6A62;
  --oc-line: #E2DED5;
}

/* ── 右下の相談ボタン ── */
.oc-fab {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 400;
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 22px 0 18px;
  border-radius: 28px;
  background: var(--oc-ink);
  color: var(--oc-gold-light);
  border: 1px solid rgba(212,184,122,0.6);
  font-family: 'Noto Sans JP', sans-serif; font-size: 13px; letter-spacing: 0.12em;
  cursor: pointer;
  opacity: 0; transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease, background .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.oc-fab.is-ready { opacity: 1; transform: translateY(0); }
.oc-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }
.oc-fab:hover { background: #1a1a1a; }
.oc-fab:focus-visible { outline: 2px solid var(--oc-gold-light); outline-offset: 3px; }
.oc-fab svg { width: 22px; height: 22px; flex: none; }
.oc-fab .oc-dot {
  position: absolute; top: 10px; left: 35px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--oc-gold-light);
  outline: 2px solid var(--oc-ink);
}
.oc-fab.is-opened .oc-dot { display: none; }
@media (max-width: 720px) {
  .oc-fab { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); height: 54px; padding: 0 18px 0 15px; font-size: 12px; }
  .oc-fab .oc-dot { left: 32px; }
}

/* ときどき、きゅっと */
@keyframes oc-kyu {
  0% { transform: translateY(0) scale(1); }
  18% { transform: translateY(-3px) scale(1.05); }
  36% { transform: translateY(0) scale(0.98); }
  54% { transform: translateY(-1px) scale(1.015); }
  72%, 100% { transform: translateY(0) scale(1); }
}
@keyframes oc-ring {
  0% { box-shadow: 0 0 0 0 rgba(212,184,122,0.5); }
  100% { box-shadow: 0 0 0 12px rgba(212,184,122,0); }
}
.oc-fab.is-nudge { animation: oc-kyu .8s cubic-bezier(.3,.7,.4,1) 1, oc-ring 1.2s ease-out 1; }

/* ひとこと吹き出し（1回だけ） */
.oc-teaser {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 399;
  max-width: 250px;
  padding: 12px 34px 12px 15px;
  background: var(--oc-bubble); color: var(--oc-text);
  border: 1px solid #CFC8B8; border-radius: 14px 14px 4px 14px;
  font-family: 'Noto Sans JP', sans-serif; font-size: 13px; line-height: 1.65; letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.oc-teaser.is-show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.oc-teaser small { display: block; color: var(--oc-sub); font-size: 11px; margin-bottom: 2px; letter-spacing: 0.06em; }
.oc-teaser button {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border: 0; background: transparent; color: var(--oc-sub); font-size: 15px; cursor: pointer; line-height: 1;
}
@media (max-width: 720px) { .oc-teaser { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(82px + env(safe-area-inset-bottom, 0px)); } }

/* ── メッセージ画面 ── */
.oc-backdrop {
  position: fixed; inset: 0; z-index: 410;
  background: rgba(10,10,10,0.45);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.oc-backdrop.is-open { opacity: 1; pointer-events: auto; }
.oc-panel {
  position: fixed; z-index: 420;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 380px; height: min(600px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: var(--oc-paper);
  border: 1px solid rgba(212,184,122,0.45);
  border-radius: 18px; overflow: hidden;
  font-family: 'Noto Sans JP', sans-serif; color: var(--oc-text);
  opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom right;
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
  pointer-events: none; visibility: hidden;
}
.oc-panel.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .35s ease, transform .35s ease; }
@media (max-width: 720px) {
  .oc-panel {
    left: 0; right: 0; bottom: 0; width: auto;
    height: 88vh; height: 88dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    transform: translateY(24px); transform-origin: bottom center;
  }
}

.oc-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--oc-ink); color: #F5F1E8;
}
.oc-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden;
  outline: 1px solid rgba(212,184,122,0.6); outline-offset: 2px;
}
.oc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-bar[hidden] { display: none; }
.oc-head-text { flex: 1; min-width: 0; }
.oc-head-name { font-size: 14px; letter-spacing: 0.04em; }
.oc-head-sub { font-size: 11px; color: #B9B4A8; letter-spacing: 0.04em; }
.oc-close {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #F5F1E8; font-size: 20px; cursor: pointer;
}
.oc-close:focus-visible { outline: 2px solid var(--oc-gold-light); }

.oc-log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 14px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.oc-day { align-self: center; font-size: 11px; color: var(--oc-sub); letter-spacing: 0.08em; margin-bottom: 4px; }
.oc-msg {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 14px; line-height: 1.75; letter-spacing: 0.02em;
  word-break: break-word; white-space: pre-wrap;
  animation: oc-in .35s ease both;
}
@keyframes oc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.oc-msg.bot { align-self: flex-start; background: var(--oc-bubble); border: 1px solid var(--oc-line); border-radius: 4px 16px 16px 16px; }
.oc-msg.me { align-self: flex-end; background: var(--oc-ink); color: #F5F1E8; border-radius: 16px 4px 16px 16px; }
.oc-typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; background: var(--oc-bubble); border: 1px solid var(--oc-line); border-radius: 4px 16px 16px 16px; }
.oc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #B7B1A4; animation: oc-blink 1.1s infinite ease-in-out; }
.oc-typing i:nth-child(2) { animation-delay: .15s; } .oc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes oc-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.oc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px; animation: oc-in .35s ease both; }
.oc-chip {
  border: 1px solid var(--oc-gold); background: #FFFDF8; color: #5E4E2C;
  border-radius: 18px; padding: 8px 14px;
  font-family: inherit; font-size: 13px; letter-spacing: 0.02em; cursor: pointer;
}
.oc-chip:hover { background: #F6EFDF; }
.oc-chip:focus-visible { outline: 2px solid var(--oc-gold); outline-offset: 2px; }

.oc-confirm {
  align-self: stretch; background: var(--oc-bubble); border: 1px solid var(--oc-line); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; line-height: 1.7; animation: oc-in .35s ease both;
}
.oc-confirm dl { margin: 0 0 10px; display: grid; grid-template-columns: 6em 1fr; gap: 4px 8px; }
.oc-confirm dt { color: var(--oc-sub); }
.oc-confirm dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.oc-confirm .oc-actions { display: flex; gap: 8px; }
.oc-send {
  flex: 1; height: 44px; border: 0; border-radius: 22px;
  background: var(--oc-ink); color: var(--oc-gold-light);
  font-family: inherit; font-size: 14px; letter-spacing: 0.1em; cursor: pointer;
}
.oc-send[disabled] { opacity: .5; cursor: default; }
.oc-redo { height: 44px; padding: 0 16px; border: 1px solid var(--oc-line); border-radius: 22px; background: transparent; font-family: inherit; font-size: 13px; color: var(--oc-sub); cursor: pointer; }
.oc-note { font-size: 11px; color: var(--oc-sub); margin-top: 8px; }

.oc-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #FFFFFF; border-top: 1px solid var(--oc-line);
}
.oc-input {
  flex: 1; min-width: 0; resize: none;
  max-height: 120px; min-height: 42px;
  padding: 10px 14px; border: 1px solid var(--oc-line); border-radius: 21px;
  font-family: inherit; font-size: 16px; line-height: 1.45; color: var(--oc-text); background: #FAF9F6;
}
.oc-input:focus { outline: none; border-color: var(--oc-gold); background: #FFF; }
.oc-input[disabled] { background: #F0EEE9; }
.oc-go {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%;
  background: var(--oc-ink); color: var(--oc-gold-light); cursor: pointer;
  display: grid; place-items: center;
}
.oc-go[disabled] { opacity: .35; cursor: default; }
.oc-go svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .oc-fab, .oc-teaser, .oc-panel, .oc-backdrop { transition: none; }
  .oc-fab.is-nudge, .oc-msg, .oc-chips, .oc-confirm, .oc-typing i { animation: none; }
}
