/* soft-jp.com の全ページで共通の部品（色・上の帯・下の帯・言語の切り替え）。
   作りは各サービスのトップページ（Tomeoki・Lapizly の lp-）と同じ */
:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #5f6368;
  --line: #e3e3de;
  --accent: #2458d6;
  --primary: #2f6f5e;
  --primary-hover: #245747;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --card: #1d1d20;
    --text: #ececef;
    --muted: #a0a0a8;
    --line: #2e2e33;
    --accent: #7ea2ff;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--card);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.7;
}
[data-lang="en"] .ja, [data-lang="ja"] .en { display: none; }

.lp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.lp-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.lp-header .lp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: .04em; color: var(--text); text-decoration: none; }
.lp-brand img { width: 30px; height: 30px; }
.lp-nav { display: flex; align-items: center; gap: 20px; }
.lp-nav a.lp-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.lp-nav a.lp-link:hover { color: var(--text); }
.lang { display: flex; gap: 4px; }
.lang button {
  font: inherit; font-size: 13px; padding: 3px 10px; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 6px;
}
.lang button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.lp-btn { display: inline-block; text-decoration: none; font-weight: 700; border-radius: 8px; padding: 10px 20px; transition: background .15s; }
.lp-btn-primary { background: var(--primary); color: #fff; }
.lp-btn-primary:hover { background: var(--primary-hover); }
.lp-btn-outline { border: 1px solid #fff; color: #fff; }
.lp-btn-outline:hover { background: rgba(255, 255, 255, .12); }
.lp-btn-lg { padding: 14px 28px; font-size: 17px; }

/* ログインしているときの右上のアイコンとメニュー（site.js。template の app/style.css と同じ形） */
.user-area { position: relative; flex-shrink: 0; }
.user-btn { background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; border-radius: 50%; }
.user-initial {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: bold; color: #fff; background: var(--primary);
}
.user-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.user-initial.lg, .user-photo.lg { width: 42px; height: 42px; font-size: 1rem; flex-shrink: 0; }
.user-photo[hidden], .user-initial[hidden] { display: none; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 260px; z-index: 950; overflow: hidden;
  background: rgba(30, 30, 50, .95); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); color: #fff;
}
.user-menu[hidden] { display: none; }
.user-menu-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.user-id { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-weight: bold; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { font-size: .85rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-sep { height: 1px; background: rgba(255, 255, 255, .12); margin: 2px 0; }
.user-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: inherit; font-size: .88rem; text-decoration: none; }
.user-menu a:hover, .user-menu a:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.user-menu .menu-icon { flex: none; opacity: .8; }
.user-menu .logout { color: #f99; }
.user-menu .logout:hover, .user-menu .logout:focus-visible { background: rgba(220, 50, 50, .2); }

/* アプリランチャー（app/launcher.js。ui-components.md §3.12）。ユーザーのアイコンの左に置き、ユーザーメニューと同じ暗いグラスのパネルを開く */
.app-launcher { position: relative; flex-shrink: 0; }
.app-launcher[hidden] { display: none; }
.launcher-btn {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  background: none !important; border: none; border-radius: 50%; color: inherit; cursor: pointer; opacity: .85;
}
.launcher-btn:hover, .launcher-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .18) !important; opacity: 1; }
.launcher-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 1px; }
.launcher-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-width: calc(100vw - 24px); z-index: 950; overflow: hidden;
  background: rgba(30, 30, 50, .95); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  color: #fff; text-shadow: none;
}
.launcher-panel[hidden] { display: none; }
.launcher-list { display: flex; flex-direction: column; gap: 2px; padding: 8px; min-height: 60px; max-height: min(70vh, 520px); overflow-y: auto; }
.launcher-app {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px;
  color: inherit; text-decoration: none;
}
.launcher-app:hover, .launcher-app:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.launcher-app.current { background: rgba(255, 255, 255, .14); }
.launcher-icon { width: 40px; height: 40px; display: flex; }
.launcher-icon img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; }
.launcher-icon img[hidden], .launcher-mark[hidden] { display: none; }
.launcher-mark {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: bold; color: #fff;
}
.launcher-icon { flex: none; }
.launcher-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.launcher-name { font-weight: bold; font-size: .9rem; }
.launcher-note { font-size: .78rem; opacity: .75; }
.launcher-foot { display: block; padding: 10px 16px; border-top: 1px solid rgba(255, 255, 255, .12); color: inherit; font-size: .85rem; text-align: center; text-decoration: none; }
.launcher-foot:hover, .launcher-foot:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.launcher-error { grid-column: 1 / -1; margin: 0; font-size: .85rem; opacity: .8; text-align: center; }
/* soft-jp.com の上の帯は明るいので、ボタンの色と押したときの色を合わせる */
.lp-header .launcher-btn { color: var(--text); }
.lp-header .launcher-btn:hover, .lp-header .launcher-btn[aria-expanded="true"] { background: var(--line) !important; }

/* スマホ幅: ボタンの右端に合わせると 320px のパネルが画面の左からはみ出すので、右へずらして画面の右端から 12px に置く
   （ボタンの右には、ユーザーのアイコン 32px・間 12px・ヘッダーの余白 24px がある） */
@media (max-width: 480px) {
  .launcher-panel { right: -56px; width: min(320px, calc(100vw - 24px)); }
}

.lp-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 13px; text-align: center; }
.lp-footer p { margin: .3em 0; }
.lp-footer a { color: var(--muted); margin: 0 .5em; }

/* 規約などの文章のページ */
.doc { max-width: 880px; margin: 0 auto; padding: 48px 24px 64px; }
.doc h1 { font-size: 28px; text-align: center; margin: 0 0 8px; }

@media (max-width: 760px) {
  .lp-nav { gap: 12px; }
  .lp-nav a.lp-link { display: none; }
  .lp-header .lp-btn { padding: 7px 14px; font-size: 14px; }
}
