/*!
 * WebView-first reset (2026 baseline)
 * MIT License | Based on common modern reset patterns + in-app WebView tweaks
 * Replace/merge freely with project styles (style.css loads after this file).
 */

/* -------------------------------------------------------------------------- */
/* Box model                                                                  */
/* -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-style: solid;
  border-width: 0;
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* Document root — WebView / mobile                                         */
/* -------------------------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  tab-size: 4;
  hanging-punctuation: first last;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Reduce accidental horizontal scroll in embedded views */
body {
  overflow-x: clip;
}

/* -------------------------------------------------------------------------- */
/* Sections & grouping                                                        */
/* -------------------------------------------------------------------------- */

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

hr {
  height: 0;
  margin: 0;
  overflow: visible;
  border-top-width: 1px;
  color: inherit;
}

pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

address {
  font-style: normal;
}

/* -------------------------------------------------------------------------- */
/* Lists                                                                      */
/* -------------------------------------------------------------------------- */

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dt {
  font-weight: 700;
}

dd {
  margin-left: 0;
}

/* -------------------------------------------------------------------------- */
/* Links & text                                                               */
/* -------------------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
}

abbr[title] {
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: bolder;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

/* -------------------------------------------------------------------------- */
/* Media & replaced content                                                   */
/* -------------------------------------------------------------------------- */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  fill: currentColor;
}

iframe {
  border: 0;
}

/* -------------------------------------------------------------------------- */
/* Forms — iOS / Android WebView                                              */
/* -------------------------------------------------------------------------- */

button,
input,
optgroup,
select,
textarea {
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  background: transparent;
  border-radius: 0;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  overflow: auto;
}

select::-ms-expand {
  display: none;
}

[type="search"] {
  outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="number"] {
  -moz-appearance: textfield;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

fieldset {
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

option {
  padding: 0;
}

progress {
  vertical-align: baseline;
}

label[for] {
  cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* Interactive                                                                */
/* -------------------------------------------------------------------------- */

details {
  display: block;
}

summary {
  display: list-item;
}

[contenteditable]:focus {
  outline: auto;
}

/* -------------------------------------------------------------------------- */
/* Tables                                                                     */
/* -------------------------------------------------------------------------- */

table {
  border-color: inherit;
  border-collapse: collapse;
}

caption {
  text-align: left;
}

th,
td {
  padding: 0;
  vertical-align: top;
}

th {
  text-align: left;
  font-weight: 700;
}
