/* "My own words and grammar" on vocab.html and grammar.html (behaviour: assets/my-entries-ui.js). */
.mine-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.mine-add, .mine-hidden-toggle {
  min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill, 999px);
  color: var(--blue-600); background: rgb(var(--surface-rgb) / .9); font: inherit; font-size: .86rem; font-weight: 500; cursor: pointer;
}
.mine-add { border-style: dashed; }
.mine-add:hover, .mine-hidden-toggle:hover { background: var(--surface); box-shadow: 0 6px 16px rgb(var(--shadow-rgb) / .1); }
.mine-hidden-toggle { color: var(--muted); }
.mine-hidden-toggle[aria-pressed="true"] { border-color: var(--control-line); color: var(--blue-600); background: var(--blue-100); }
.mine-add:focus-visible, .mine-hidden-toggle:focus-visible, .mine-action:focus-visible,
.mine-dialog button:focus-visible, .mine-dialog a:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 3px; }
.mine-sync { flex-basis: 100%; margin: 0; padding: 8px 12px; border: 1px solid var(--tint-3); border-radius: 12px; color: var(--ink-2); background: var(--tint-1); font-size: .8rem; line-height: 1.55; }

/* per-card button: light, but a full 44px tap target */
.mine-action {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -6px 0;
  padding: 4px 10px; border: 0; border-radius: var(--radius-pill, 999px); color: var(--muted); background: transparent;
  font: inherit; font-size: .78rem; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.mine-action:hover { color: var(--blue-600); background: var(--tint-1); }
.mine-badge { display: inline-block; padding: 2px 7px; border-radius: var(--radius-pill, 999px); color: var(--blue-600); background: var(--blue-100); font-size: .72rem; font-weight: 500; white-space: nowrap; }
/* desktop: under the tag, left-aligned (the reading column is a grid) */
#list .entry .meta .mine-action { justify-self: start; margin: -6px 0 -6px -10px; }
#list .entry.is-mine { border-style: dashed; }
#list .entry.is-user-hidden { opacity: .78; }
/* grammar.html: the tag and the button share one cell */
#list .entry > .mine-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 780px) {
  #list .entry > .mine-meta { grid-column: 2; }
}
@media (max-width: 600px) {
  /* the button sits at the end of the reading/tag row, so cards don't grow a row */
  #list .entry .meta .mine-action, #list .entry > .mine-meta .mine-action { margin-left: auto; }
  #list .entry > .num .mine-badge { font-size: .7rem; padding: 1px 6px; }
}

/* dialogs */
.mine-dialog {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px;
  border: 1px solid var(--border, var(--line)); border-radius: 20px; color: var(--ink); background: var(--surface);
  box-shadow: 0 24px 60px rgb(var(--shadow-rgb) / .25);
}
.mine-dialog::backdrop { background: rgb(0 0 0 / .32); }
.mine-dialog:not([open]) { display: none; }
/* browsers without <dialog>.showModal(): the open attribute still shows it, on top */
.mine-dialog[open] { position: fixed; inset: 0; z-index: var(--z-popover, 60); margin: auto; height: fit-content; }
.mine-title { margin: 0 0 12px; font-size: 1.1rem; }
.mine-form { display: grid; gap: 10px; margin: 0; }
.mine-field { display: grid; gap: 4px; }
.mine-field label { color: var(--ink-2); font-size: .84rem; font-weight: 500; }
.mine-field input, .mine-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control, 10px);
  color: var(--ink); background: var(--surface); font: inherit; font-size: 1rem; line-height: 1.5;
}
.mine-field textarea { resize: vertical; }
.mine-field input[lang="ja"], .mine-field textarea[lang="ja"] { font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; }
.mine-field input:focus-visible, .mine-field textarea:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 1px; }
.mine-field [aria-invalid="true"] { border-color: var(--bad-line, #d66); }
.mine-error { margin: 0; color: var(--bad, #b33); font-size: .8rem; }
.mine-form-note { margin: 0; padding: 8px 12px; border-radius: 12px; color: var(--ink-2); background: var(--tint-1); font-size: .8rem; line-height: 1.55; }
.mine-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.mine-primary, .mine-secondary, .mine-delete {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px;
  border-radius: var(--radius-pill, 999px); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.mine-primary { border: 0; color: white; background: var(--btn-grad); }
.mine-secondary { border: 1px solid var(--line); color: var(--blue-600); background: var(--surface); }
.mine-delete { margin-right: auto; border: 1px solid var(--bad-line, #e6b4b4); color: var(--bad, #b33); background: var(--bad-bg, #fff4f4); }
.mine-login-text { margin: 0 0 6px; text-wrap: balance; font-size: 1rem; font-weight: 500; line-height: 1.6; }
.mine-login-sub { margin: 0 0 8px; color: var(--muted); font-size: .86rem; }
