/* css/style.css */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f8f7f4;
  --surface:   #ffffff;
  --border:    #e2e0d8;
  --text:      #1a1a18;
  --text-sub:  #6b6b67;
  --primary:   #534AB7;
  --primary-h: #3C3489;
  --danger:    #A32D2D;
  --radius:    12px;
  --shadow:    0 2px 12px rgba(0,0,0,0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen { display: flex; flex-direction: column; height: 100dvh; }
.hidden { display: none !important; }

/* ログイン画面 */
#screen-login {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
}

.logo { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.tagline { font-size: 14px; color: var(--text-sub); margin-bottom: 32px; line-height: 1.6; }

.login-buttons { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 8px; font-size: 15px; font-weight: 500;
  border: none; cursor: pointer; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-secondary{ background: var(--border); color: var(--text); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-sm       { padding: 8px 14px; font-size: 13px; }

.btn-google { background: #fff; color: #333; border: 1px solid var(--border); }
.btn-line   { background: #06C755; color: #fff; }

.privacy-note { font-size: 12px; color: var(--text-sub); line-height: 1.6; }

/* メイン画面 */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.header-logo { font-weight: 700; font-size: 18px; color: var(--primary); }
.btn-icon { background: none; border: none; font-size: 13px; color: var(--text-sub); cursor: pointer; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.message {
  max-width: 80%; padding: 12px 16px; border-radius: var(--radius);
  font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.message-user {
  align-self: flex-end; background: var(--primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.message-assistant {
  align-self: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.action-card {
  align-self: flex-start; background: #EEEDFE; border: 1px solid #AFA9EC;
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px; max-width: 80%;
}
.action-card p { font-size: 14px; color: #3C3489; font-weight: 500; }
.action-card div { display: flex; gap: 8px; }

.chat-input-area {
  display: flex; gap: 8px; padding: 12px 16px;
  background: var(--surface); border-top: 1px solid var(--border);
}
#chat-input {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  background: var(--bg); color: var(--text); outline: none;
}
#chat-input:focus { border-color: var(--primary); }

/* 設定画面 */
#screen-settings { align-items: center; justify-content: center; padding: 24px; }
.settings-panel {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  max-width: 380px; width: 100%; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 20px;
}
.settings-panel h2 { font-size: 20px; }
.setting-item { display: flex; flex-direction: column; gap: 8px; }
.setting-item label { font-size: 14px; color: var(--text-sub); }
.setting-item select {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; background: var(--bg); color: var(--text);
}
hr { border: none; border-top: 1px solid var(--border); }

/* 連携アカウント */
.identities-status { font-size: 13px; color: var(--text); padding: 8px 0; }
.identities-actions { display: flex; flex-direction: column; gap: 8px; }
.link-message { font-size: 12px; color: var(--primary); margin-top: 6px; }
