/* ============================================================
   日瑩 Jocund Year — 文字編輯 / in-page text editor
   Shared across all pages. Loaded after site.css.
   ============================================================ */

/* edit-mode candidate highlight */
.jy-te-editing [data-te-cand] { outline: 1px dashed rgba(255,138,0,.5); outline-offset: 3px; cursor: text; transition: outline-color .15s ease, background .15s ease; }
.jy-te-editing [data-te-cand]:hover { outline-color: var(--orange-500); background: rgba(255,138,0,.05); }
.jy-te-editing [data-te-cand].is-te-sel { outline: 1.5px solid var(--orange-500); outline-offset: 3px; background: rgba(255,138,0,.06); }

/* toolbar button (matches free-layer toolbar styling) */
.jy-te-tbtn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: .04em;
  padding: 12px 18px; border-radius: 999px; border: none; cursor: pointer;
  background: #1f1d1a; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transition: transform .2s ease, background .2s ease;
}
.jy-te-tbtn:hover { transform: translateY(-2px); background: var(--orange-600); }
.jy-te-tbtn--on { background: var(--orange-500); }
.jy-te-tbtn--on:hover { background: var(--orange-600); }

/* editor panel */
.jy-te-panel {
  position: fixed; z-index: 70; width: 320px; max-width: calc(100vw - 28px);
  background: #fff; border: 1px solid #e7e3db; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(20,18,15,.22); overflow: hidden;
  font-family: var(--font-sans); color: #1f1d1a;
}
.jy-te-panel__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: #1f1d1a; color: #fff; cursor: grab; user-select: none;
}
.jy-te-panel__bar:active { cursor: grabbing; }
.jy-te-panel__title { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; }
.jy-te-panel__x { background: none; border: none; color: #fff; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.jy-te-panel__body { padding: 14px; display: flex; flex-direction: column; gap: 14px; max-height: 72vh; overflow-y: auto; }

.jy-te-grp { display: flex; flex-direction: column; gap: 7px; }
.jy-te-lab { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8c8478; display: flex; align-items: center; justify-content: space-between; }
.jy-te-lab span { color: var(--orange-600); font-variant-numeric: tabular-nums; }
.jy-te-ta {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 72px;
  font-family: var(--font-sans); font-size: 13.5px; line-height: 1.7; color: #1f1d1a;
  border: 1px solid #e0dbd2; border-radius: 8px; padding: 9px 11px; background: #faf8f5;
}
.jy-te-ta:focus { outline: none; border-color: var(--orange-500); background: #fff; }
.jy-te-hint { font-size: 11px; color: #a39a8c; line-height: 1.5; }
.jy-te-range { width: 100%; accent-color: var(--orange-500); }

.jy-te-seg { display: flex; gap: 6px; }
.jy-te-seg button {
  flex: 1; font-family: var(--font-sans); font-size: 12.5px; padding: 7px 0; cursor: pointer;
  border: 1px solid #e0dbd2; border-radius: 7px; background: #faf8f5; color: #5d564c;
}
.jy-te-seg button.is-on { background: #1f1d1a; color: #fff; border-color: #1f1d1a; }

.jy-te-foot { display: flex; gap: 8px; padding-top: 2px; }
.jy-te-foot button {
  flex: 1; font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; padding: 9px 0; cursor: pointer;
  border-radius: 8px; border: 1px solid #e0dbd2; background: #fff; color: #5d564c;
}
.jy-te-foot button.jy-te-reset:hover { border-color: #d9534f; color: #d9534f; }
.jy-te-foot button.jy-te-done { background: var(--orange-500); border-color: var(--orange-500); color: #fff; }
.jy-te-foot button.jy-te-done:hover { background: var(--orange-600); border-color: var(--orange-600); }

.jy-te-empty { font-size: 12.5px; color: #a39a8c; line-height: 1.7; text-align: center; padding: 10px 4px; }
