@charset "utf-8";

/* 本文 */
:root {
  font-size: 9pt;
  line-height: 1.5;
  font-family: メイリオ, sans-serif;
  
  -ah-punctuation-trim: start end adjacent;
  -ah-text-justify-trim: punctuation-except-fullstop kana;
  -ah-text-autospace: ideograph-numeric ideograph-alpha;
  -ah-text-autospace-width: 20%;
  -ah-line-height-shift-adjustment: disregard-shifts;
  -ah-kerning-mode: pair;
  -ah-ligature-mode: all;
  widows: 2;
  orphans: 2;
  
  counter-reset: ChapterNo;

  /* PDF Layer */
  -ah-layer-settings: "上レイヤー", "下レイヤー", "日本語レイヤー" lang "ja" preferred, "English Layer" lang "en" preferred;
}

/* 共通のページ設定 */
@page {
  size: a6 landscape;
  margin: 8mm 7.325mm;
  /*
  -ah-marks: crop cross;
  -ah-crop-offset: 10mm;
  */
  font: 8pt メイリオ, sans-serif;
  @top-right { content: string(Chapter) }
  @bottom-right { content: "Page " counter(page) " of " counter(pages) }
}

@page Chapter:first {
  @top-right { content: none }
}

@page TOC:first {
  @top-right { content: none }
}

/* 段落 */
p {
  text-align: justify;
  text-indent: 1em;
  margin: 0;
}
li {
  text-align: justify;
}

/* コード例 */
pre {
  font-family: Consolas, MS UI Gothic, monospace;
  line-height: 1.1;
  margin-top: .3em;
  margin-bottom: .3em;
  background-color: #FFD;
  padding: .2em;
  -ah-text-autospace: none;
}

p.Note {
  display: list-item;
  text-indent: 0;
  margin-left: 1em;
}
p.Note::marker {
  content: "※";
}
p.Label {
  margin-top: .5em;
  text-indent: 0;
  page-break-after: avoid;
  page-break-inside: avoid;
}

.NoBreak {
  page-break-inside: avoid;
}
.NoBreakA {
  page-break-inside: avoid;
  page-break-after: avoid;
}

code {
  font-family: Consolas, MS UI Gothic, monospace;
  -ah-text-autospace: none;
}

.Smaller {
  font-size: smaller;
}

figure {
  display: block;
  margin-top: 1em;
  margin-bottom: 1em;
}
figcaption {
  display: block;
  font-weight: bold;
  font-size: 8pt;
  line-height: 1;
  page-break-after: avoid;
  page-break-inside: avoid;
  text-align: center;
}
figure > img,
figure > video {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: .8em;
  margin-bottom: .8em;
}

/* 強調 */
b {
  background-color: yellow;
}

/* 文書タイトル */
.CoverPage > h1 {
  margin-top: 10mm;
  -ah-string-set: Title content();
  font: bold 22pt メイリオ, sans-serif;
  text-align: center;
}

.CoverPage img.AHFLogo {
  margin: 0 -1em -0.6em 0;
  width: 15em;
}
.CoverPage img.AHLogo {
  margin: 0;
  width: 7em;
}


/* 日付 */
.CoverPage .Published {
  display: block;
  margin-top: 8mm;
  text-align: center;
  font: 14pt メイリオ, sans-serif;
}

/* 著者 */
.CoverPage .Author {
  display: block;
  margin-top: 8mm;
  text-align: center;
  font: 14pt/1.4 メイリオ, sans-serif;
}

.CoverPage .Author .Name {
  margin-top: 1em;
}
.CoverPage .Author .Twitter {
  font-size: 9pt;
}
.CoverPage .Author .Mail {
  font-size: 9pt;
}

/* 章 */
.Chapter {
  page: Chapter;
  page-break-before: always;
  counter-increment: ChapterNo;
  counter-reset: SectionNo;
}
.Chapter > h2 {
  -ah-string-set: Chapter content(before) content(), Section "";
  margin-top: 0;
  padding-bottom: 1.5pt;
  border-bottom: 1.5pt solid #338;
  margin-bottom: 17pt;
  font: bold 18pt メイリオ, sans-serif;
}
.Chapter > h2::before {
  content: "Chapter " counter(ChapterNo) ". ";
}

/* 節 */
.Chapter > section {
  counter-increment: SectionNo;
}
.Chapter > section > h3 {
  -ah-string-set: Section content(before) content();
  margin-top: 20pt;
  margin-bottom: 8pt;
  font: bold 12pt メイリオ;
  padding: 5pt;
  background-color: #e0dde8;
  border-radius: 6pt;
}
.Chapter > section > h3::before {
  content: counter(ChapterNo) "." counter(SectionNo) "\a0  ";
}

h4 {
  margin-top: 8pt;
  margin-bottom: 0pt;
}

/* リンク */
a:link, a:visited, a:active { text-decoration: none }

/* クロスリファレンス */
.ChapterRef::before {
  content: "Chapter " target-counter(attr(href, url), ChapterNo) ". ";
}
.PageRef::after {
  content: " (page " target-counter(attr(href, url), page) ")";
}
.TitleRef {
  content: target-text(attr(href, url), content(before)) target-text(attr(href, url), content());
}

/* 目次 */
.TOC {
  page: TOC;
  page-break-before: always;
}
.TOC > h2 {
  -ah-string-set: Chapter content(), Section "";
  text-align: start;
  margin-top: 0;
  margin-bottom: 3mm;
  font: bold 12pt メイリオ, sans-serif;
}

.TOC ul {
  /*column-rule: dotted gray 1pt;*/
  list-style: none;
  margin-left: 1em;
  margin-right: 0;
  padding: 0;
  font-size: 11pt;
}

.TOC ul ul {
  margin: 0;
}
.TOCSample li.TocLevel1,
.TOC li.TocLevel1 {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11pt;
  background-color: #DEF;
}
.TOC li.TocLevel2 {
  list-style: none;
  margin: 0;
  padding: 0;
  text-indent: 1em;
  font-size: 10pt;
}
.TOC li.TocLevel3 {
  list-style: none;
  margin: 0;
  padding: 0;
  text-indent: 2.0em;
  font-size: 9pt;
}
.TOCSample a,
.TOC a {
  text-decoration: none;
  color: navy;
  /*content: target-text(attr(href, url));*/
}

.TOCSample li.TocLevel1 a::before,
.TOC li.TocLevel1 a::before {
  content: "Chapter " target-counter(attr(href, url), ChapterNo) ". ";
}
.TOCSample li.TocLevel1 a::after,
.TOC li.TocLevel1 a::after {
  content: " " leader(dotted) " " target-counter(attr(href, url), page);
  font-size: 9pt;
  -ah-leader-alignment: reference-area;
}
.TOC li.TocLevel2 a::before {
  content: target-counter(attr(href, url), ChapterNo) "." target-counter(attr(href, url), SectionNo) " ";
}
.TOC li.TocLevel2 a::after {
  content: " " leader(dotted) " " target-counter(attr(href, url), page);
  font-size: 9pt;
  -ah-leader-alignment: reference-area;
}
.TOC li.TocLevel3 a::before {
  content: target-counter(attr(href, url), ChapterNo) "." target-counter(attr(href, url), SectionNo) "." target-counter(attr(href, url), SubSectionNo) " ";
}
.TOC li.TocLevel3 a::after {
  content: " " leader(dotted) " " target-counter(attr(href, url), page);
  font-size: 9pt;
  -ah-leader-alignment: reference-area;
}

ul.TOCSample {
  list-style: none;
  margin: .5em 1em;
  padding: 0;
  font-size: 11pt;
}

/* 段組 */
div.MultiCol {
  column-count: 2;                /* 段数を指定 */
  column-gap: 1.5em;                /* 段間 */
  column-rule: dotted green 1mm;  /* 段間罫 */
  border: solid 0.3pt gray;
  padding: 3pt;
  margin: 0.8em 0;
}

div.TwoCol {
  display: table;
  table-layout: fixed;
  width: 100%;
}
div.TwoCol > div {
  display: table-cell;
  vertical-align: middle;
}

/* フロート */

.AbsFloat {
  -ah-float: end before;
  -ah-float-margin-x: 3pt;
  -ah-float-min-wrap-x: 4em;
  -ah-float-margin-y: 3pt;
  border: ridge orange 3pt;
  padding: 2pt;
}

.MultiColFloat {
  -ah-float: end before;
  -ah-float-margin-x: 3pt;
  -ah-float-min-wrap-x: 4em;
  -ah-float-margin-y: 3pt;
  border: ridge green 2pt;
  padding: 2pt;
  -ah-box-sizing: border-box;
}


.RelFloat {
  -ah-float: end auto-next;
  -ah-float-margin-x: 3pt;
  -ah-float-min-wrap-x: 4em;
  -ah-float-margin-y: 3pt;
  border: ridge lime 3pt;
  padding: 2pt;
}


/* 脚注 */

.Footnote {
  text-align: justify;
  float: footnote;
  text-indent: 0;
  font: 8pt/1.2 メイリオ, sans-serif;
}

@page {
  @footnote {
    float: bottom;
    border-top: .5pt solid black;
    border-length: 30%;
    padding-top: 0.5em;
    padding-left: 10pt;
  }
}

::footnote-call {
  content: "(" counter(footnote, decimal) ")";
  font-size: 6pt;
  vertical-align: super;
}

::footnote-marker {
  content: "(" counter(footnote, decimal) ")";
  font-size: 6pt;
  vertical-align: super;
}

/* table */
table.StdTable {
  border: solid thin gray;
  margin-top: 1em;
  margin-bottom: 1em;
  border-collapse: collapse;
}
table.StdTable td,
table.StdTable th {
  border: solid thin gray;
  padding: 3pt;
}
table.StdTable thead th {
  background-color: silver;
}
table.StdTable td {
  vertical-align: top;
}

thead.vertical th {
  vertical-align: bottom;
  width: 2em;
}

table.Fixed {
  table-layout: Fixed;
  width: 100%;
}

/* ハイフネーション */
.Hyphenated {
  -ah-hyphens: auto;
}

/* 文中のサンプル */
.TextSample {
  font-family: "游明朝", IPAex明朝;
}
.NoSpacing {
  -ah-text-autospace: none;
  -ah-punctuation-trim: none;
  -ah-text-justify-trim: none;
}

/* 縦書きブロック */
div.VerticalTextBlock {
  -ah-writing-mode: vertical-rl;
  -ah-break-inside: avoid-column;
  font-family: "游明朝", IPAex明朝;
  height: 16em;
  padding: 3pt;
  border: ridge green 2pt;
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

div.Vertical {
  -ah-writing-mode: vertical-rl;
  -ah-display-align: center;
}

/* 縦中横 */
span.TateChuYoko {
  display: inline-block;
  -ah-writing-mode: horizontal-tb;
  text-align: center;
  text-indent: 0;
  line-height: 1;
  margin-top: 0.15em;    /* 垂直位置の調整 */
  margin-bottom: -0.15em;
}

div.TextBlock {
  -ah-break-inside: avoid-column;
  margin-top: 1em;
  margin-bottom: 1em;
}

/* ルビテスト */
.RubyTest {
  font-family: "游明朝", IPAex明朝;
  font-size: 16pt;
  line-height: 2;
  -ah-margin-start: 2em;
  -ah-line-stacking-strategy: max-height;
  page-break-inside: avoid;
}
.Vertical > .RubyTest {
  -ah-margin-start: 0;
}
.TwoCol > .RubyTest {
  -ah-padding-start: 2em;
}

em.Kenten {
  -ah-text-emphasis-style: filled;
  -ah-text-emphasis-font-family: KentenGeneric;
  font-style: normal;
}	 

.IVSTest {
  font-family: "游明朝", IPAex明朝;
  font-size: 12pt;
  line-height: 1.75;
  -ah-margin-start: 2em;
}

.Upright {
  -ah-text-orientation: upright;
}

/* 図 */
.FloatRight {
  -ah-float: right center;
  clear: right;
}
.FloatCenter {
  -ah-float: center normal;
  clear: right;
}

/* Bookmarks */
h1 { -ah-bookmark-level: 1 }
h2 { -ah-bookmark-level: 2; -ah-bookmark-state: closed  }
h3 { -ah-bookmark-level: 3; -ah-bookmark-state: closed }
h4,h5,h6 { -ah-bookmark-level: none }


/* MathML and SVG */
math {
  vertical-align: baseline;
}
svg {
  vertical-align: bottom;
}

/* Lists */

ul.PropDef > li {
  text-align: start;
}

ul>li::marker {
  content: "❏";
}
ul ul>li::marker, ol ul>li::marker	{
  content: "✦";
}
ul ul ul>li::marker, ol ul ul>li::marker, ol ol ul>li::marker, ul ol ul>li::marker {
  content: "✧";
}

ul.AhfFeature {
  padding-left: 1em;
}
ul.AhfFeature li {
  list-style: check;
  margin: .5em 0;
  text-align: justify;
}

/* 縦中横 */
.TCY {
  -ah-text-combine: horizontal;
}

/* version up */
span.vup {
  font-weight: normal;
  font-size: 0.8em;
  border: dotted 0.75pt #888;
  padding-left: 0.2em;
  padding-right: 0.2em;
  margin: 0.2em;
  white-space: nowrap;
}

/* Web Fonts */
@font-face {
    font-family: 'TangerineRegular';
    src: url('fonts/Tangerine_Regular-webfont.woff') format('woff');
}
@font-face {
    font-family: 'GoodDogRegular';
    src: url('fonts/GoodDog-webfont.woff') format('woff');
}
.WebFont1 {
  font-family: 'TangerineRegular';
}
.WebFont2 {
  font-family: 'GoodDogRegular';
}
.WebFontTest {
  font-size: 20pt;
  -ah-break-inside: avoid-column;
  margin-top: .5em;
  margin-bottom: .5em;
  text-align: center;
}

.Display {
  text-align: center;
  -ah-break-inside: avoid-column;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1em;
  margin-bottom: 1em;
  padding: 2pt;
  border: 1pt solid silver;
}

.LangTest {
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.4;
}
.LangTest p {
  margin: 0;
  text-align: start;
  text-indent: 0;
}
.LangTest blockquote {
  margin-top: 3pt;
  margin-bottom: 6pt;
  margin-left: 1em;
  margin-right: 1em;
  font-family: serif;
  font-size: 12pt;
}

.LangTest blockquote:lang(ar) {
  font-family: Arabic Typesetting;
}
.LangTest blockquote:lang(ur) {
  font-family: Nafees Nastaleeq, Arabic Typesetting;
}
.LangTest blockquote:lang(he) {
  font-family: FrankRuehl;
}

.LangTest blockquote:lang(hi) {
  font-family: Mangal;
}
.LangTest blockquote:lang(bn) {
  font-family: Vrinda;
}
.LangTest blockquote:lang(gu) {
  font-family: Shruti;
}
.LangTest blockquote:lang(ta) {
  font-family: Latha;
}
.LangTest blockquote:lang(ml) {
  font-family: Kartika;
}
.LangTest blockquote:lang(kn) {
  font-family: Tunga;
}
.LangTest blockquote:lang(or) {
  font-family: Lohit Oriya, FreeSerif, Kalinga;
}
.LangTest blockquote:lang(te) {
  font-family: Gautami;
}
.LangTest blockquote:lang(pa) {
  font-family: Raavi;
}
.LangTest blockquote:lang(km) {
  font-family: DaunPenh;
}
.LangTest blockquote:lang(lo) {
  font-family: DokChampa;
}
.LangTest blockquote:lang(th) {
  font-family: Angsana New;
}

.LangTest p.Label {
  font-weight: bold;
}

div.TwoCols {
  column-count: 2;
  margin-top: .5em;
  margin-bottom: .5em;
}

.GradientTest {
  height: 5em;
  padding: 2pt;
  margin: 0.5em;
}

.GradientTest pre {
  background: transparent;
  white-space: pre-wrap;
}

.MultiColLineGrid {
  -ah-baseline-grid: new;
  font-size: 9pt;
  line-height: 14pt;
  font-family: "游明朝", "IPAex明朝", serif;
  column-count: 2;
  column-gap: 2em;
  height: calc(12lh - (1lh - 1em));
  text-align: justify;
  widows: 1;
  orphans: 1;
  border: dotted green 1pt;
  padding: 0pt;
  background: repeating-linear-gradient(transparent 0pt, transparent 8.5pt, #8FF 9pt, transparent 9.5pt, transparent 13pt, #8FF 13.5pt, transparent 14pt);
  margin-left: -1pt;
  margin-right: -1pt;
  margin-top: .5em;
  margin-bottom: .5em;
}
.MultiColLineGrid h3 {
  -ah-baseline-grid: new;
  font-size: 1.8em;
  line-height: 1.2;
  color: navy;
  margin-top: 4pt;
  margin-bottom: 4pt;
}

.MultiColLineGrid p {
  margin: 0;
  text-indent: 1em;
}
.MultiColLineGrid .Big1 {
  font-weight: bold;
  color: maroon;
  font-size: 1.5em;
} 
.MultiColLineGrid .Big2 {
  font-weight: bold;
  color: maroon;
  font-size: 2.5em;
}
.MultiColLineGrid .Fig1 {
  float: right;
  -ah-baseline-grid: none;
  background: orange;
  padding: 6pt;
  box-sizing: border-box;
  width: 10em;
  text-align: center;
}
.MultiColLineGrid .Fig2 {
  -ah-baseline-grid: none;
  background: lime;
  padding: 2pt;
  box-sizing: border-box;
  width: 90%;
  margin: 0 auto;
  text-align: center;
  line-height: 1.1;
}
.MultiColLineGrid .ColBreak {
  break-before: column;
}

.TextShadowTest {
  font-family: メイリオ, sans-serif;
  font-weight: bold;
  font-size: 24pt;
  line-height: 1.6;
  padding-left: 1em;
  padding-right: 1em;
  margin-bottom: 10pt;
}
.BoxShadowTest
{
  border:1pt solid blue;
  border-radius: 5pt;
  background-color: yellow;
  padding: 4pt 15pt;
  margin: 12pt;
}
